@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #1a1a28;
    --bg-card-hover: #1f1f32;
    --accent: #6c63ff;
    --accent-hover: #7d75ff;
    --accent-glow: rgba(108, 99, 255, 0.35);
    --accent-2: #ff6584;
    --text-primary: #f0f0ff;
    --text-secondary: #8888aa;
    --text-muted: #555577;
    --border: rgba(108, 99, 255, 0.2);
    --border-hover: rgba(108, 99, 255, 0.5);
    --success: #43e97b;
    --error: #ff4757;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-accent: 0 8px 40px rgba(108, 99, 255, 0.25);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---------- Background Orbs ---------- */
.bg-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.15;
    animation: drift 20s ease-in-out infinite alternate;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    left: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-2);
    bottom: -200px;
    right: -200px;
    animation-delay: -10s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: #38bdf8;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes drift {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(40px, 30px) scale(1.1);
    }
}

/* ---------- Layout ---------- */
.container {
    position: relative;
    z-index: 1;
    max-width: 780px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Navbar ---------- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.9;
}

.logo-img {
    height: 38px;
    width: 38px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.logo:hover .logo-img {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.logo-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ---------- Progress Speed ---------- */
.progress-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.progress-speed {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 80px 0 60px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(108, 99, 255, 0.12);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.hero-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 18px;
    background: linear-gradient(135deg, var(--text-primary) 0%, #a09bff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- Upload Card ---------- */
.upload-card {
    background: var(--bg-card);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.upload-card:hover,
.upload-card.drag-over {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: var(--shadow-accent);
    transform: translateY(-2px);
}

.upload-card:hover::before,
.upload-card.drag-over::before {
    opacity: 1;
}

.upload-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.15), rgba(255, 101, 132, 0.1));
    border: 1px solid var(--border);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 24px;
    transition: transform 0.3s;
}

.upload-card:hover .upload-icon {
    transform: scale(1.1) rotate(-5deg);
}

.upload-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.upload-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.upload-card input[type="file"] {
    display: none;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent), #8b83ff);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px var(--accent-glow);
    text-decoration: none;
}

.btn-upload:hover {
    background: linear-gradient(135deg, var(--accent-hover), #9a94ff);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.formats {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.format-tag {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 3px 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ---------- Progress ---------- */
.progress-section {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 40px;
    text-align: center;
    margin-top: 24px;
}

.progress-section.show {
    display: block;
}

.progress-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-secondary);
}

.progress-bar-wrap {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    border-radius: 50px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* ---------- Result ---------- */
.result-section {
    display: none;
    background: var(--bg-card);
    border: 1px solid rgba(67, 233, 123, 0.3);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    margin-top: 24px;
    animation: fadeInUp 0.5s ease;
}

.result-section.show {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-icon {
    width: 64px;
    height: 64px;
    background: rgba(67, 233, 123, 0.12);
    border: 1px solid rgba(67, 233, 123, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
}

.result-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.link-box {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 20px;
}

.link-box input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-family: 'Inter', monospace;
    outline: none;
    min-width: 0;
}

.btn-copy {
    background: var(--accent);
    border: none;
    color: #fff;
    padding: 14px 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copy:hover {
    background: var(--accent-hover);
}

.btn-copy.copied {
    background: var(--success);
}

.btn-watch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 50px;
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-watch:hover {
    background: var(--accent);
    color: #fff;
}

/* ---------- Features ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 48px;
    padding-bottom: 80px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px 20px;
    text-align: center;
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.feature-card h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.feature-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ---------- Error ---------- */
.alert {
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin-top: 24px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff6b7a;
}

/* ---------- Watch Page ---------- */
.watch-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.watch-hero {
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--border);
    padding: 32px 0;
}

.watch-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 24px;
}

.video-wrapper {
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow), 0 0 0 1px var(--border);
    position: relative;
    aspect-ratio: 16/9;
}

.video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.video-meta {
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.video-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.video-date {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.share-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    margin-top: 32px;
}

.share-box h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-content h2 {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.error-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 28px;
}

/* ---------- Footer ---------- */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.82rem;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.footer a {
    color: var(--accent);
    text-decoration: none;
}

/* ---------- Upload More Button ---------- */
.btn-upload-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 50px;
    padding: 10px 24px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    margin-top: 12px;
}

.btn-upload-more:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 600px) {
    .upload-card {
        padding: 40px 24px;
    }

    .result-section,
    .share-box {
        padding: 28px 20px;
    }

    .hero {
        padding: 50px 0 40px;
    }

    .video-meta {
        flex-direction: column;
    }
}