:root {
    --primary: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #c084fc;
    --bg-dark: #020617;
    --card-bg: rgba(15, 23, 42, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.05);
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(192, 132, 252, 0.1), transparent 40%),
        #020617;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -1px;
    z-index: 1001;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: white;
}

.nav-links .admin-link {
    background: var(--glass);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: rgba(15, 23, 42, 0.98);
    min-width: 220px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.2rem;
    padding: 0.8rem;
    z-index: 1000;
    backdrop-filter: blur(20px);
    margin-top: 0.5rem;
    animation: fadeInUp 0.3s ease;
}

.dropdown-content a {
    color: var(--text-muted);
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 0.8rem;
}

.dropdown-content a:hover {
    background: var(--glass);
    color: white;
    transform: translateX(5px);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
    background: linear-gradient(to bottom right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Downloader Box */
.downloader-box {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.platform-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.platform-item {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    flex: 1;
    min-width: 70px;
}

.platform-item i {
    font-size: 1.5rem;
}

.platform-item span {
    font-size: 0.75rem;
    font-weight: 600;
}

.platform-item:hover,
.platform-item.active {
    opacity: 1;
    transform: translateY(-3px);
}

/* Input Container */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-container input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem;
    border-radius: 1rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.input-container input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.btn-analyze {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 1.2rem;
    border-radius: 1rem;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px -5px var(--primary-glow);
}

.btn-analyze:active {
    transform: scale(0.98);
}

.btn-paste {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 1.2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.btn-paste:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-paste:active {
    transform: scale(0.95);
}

/* Results Area */
.video-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
    background: rgba(30, 41, 59, 0.5);
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    margin-top: 2rem;
}

.preview-box {
    width: 100%;
}

.video-preview-container,
.video-thumb {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.res-item {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-download {
    background: var(--success);
    color: white;
    padding: 0.8rem;
    border-radius: 0.8rem;
    text-decoration: none;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

/* History Section */
.history-container {
    margin-top: 3rem;
}

.history-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Breakpoints */
@media (min-width: 640px) {
    .history-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }

    nav {
        padding: 2rem 0;
    }

    .logo {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero p {
        font-size: 1.25rem;
    }

    .hero {
        padding: 6rem 0;
    }

    .downloader-box {
        padding: 2.5rem;
    }

    .platform-item {
        min-width: 80px;
    }

    .input-container {
        flex-direction: row;
    }

    .input-container input {
        padding: 1.2rem 1.5rem;
    }

    .btn-analyze {
        padding: 0 2.5rem;
    }

    .video-info {
        flex-direction: row;
        padding: 2.5rem;
        gap: 2.5rem;
    }

    .preview-box {
        width: 320px;
        flex-shrink: 0;
    }

    .res-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .btn-download {
        width: auto;
        padding: 0.6rem 1.5rem;
    }

    .history-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Navigation Overlay */
@media (max-width: 767px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(2, 6, 23, 0.98);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links.active {
        right: 0;
    }

    .dropdown-content {
        position: static;
        background: none;
        box-shadow: none;
        border: none;
        display: block;
        padding: 0;
        text-align: center;
        margin-top: 1rem;
    }

    .dropdown-trigger {
        display: none;
    }
}

/* Skeleton/Toast updates */
.skeleton {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.toast {
    left: 1rem;
    right: 1rem;
    bottom: 1.5rem;
    justify-content: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.history-card {
    background: var(--glass);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 0.8rem;
    border-radius: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
}

.history-card img {
    width: 60px;
    height: 60px;
    border-radius: 0.8rem;
    object-fit: cover;
    flex-shrink: 0;
}

.history-card-info {
    flex: 1;
    overflow: hidden;
    text-align: left;
}

.history-card-info strong {
    display: block;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}

.history-card-info span {
    font-size: 0.75rem;
    color: var(--text-muted);
}


.history-container {
    margin-top: 4rem !important;
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
}


.history-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}


.hero h1 {
    font-size: 3rem !important;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 50%, var(--secondary) 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    text-shadow: 0 0 30px rgba(129, 140, 248, 0.3);
}

.hero p {
    font-size: 1.2rem !important;
    color: #e2e8f0 !important;
    font-weight: 500 !important;
    max-width: 700px !important;
}

