:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #ec4899;
    --bg-dark: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Backgrounds */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 40%);
    z-index: -2;
}

.glass-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(80px);
    /* Extreme blur for smooth look */
    z-index: -1;
    opacity: 0.5;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: white;
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.lang-dropdown select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-dropdown select:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Hero */
.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
}

.hero-image-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.hero-image {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    /* Adjust as needed */
    object-fit: contain;
}

/* Search Box */
.search-box-wrapper {
    width: 100%;
    max-width: 700px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.5rem;
    border-radius: 16px;
    display: flex;
    gap: 0.5rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.3);
}

.search-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
}

.input-icon svg {
    width: 100%;
    height: 100%;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1rem 1rem 1rem 3rem;
    color: white;
    font-size: 1.1rem;
    outline: none;
    font-family: inherit;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.paste-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    margin-right: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

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

.action-button {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    padding: 0 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.action-button svg {
    width: 18px;
    height: 18px;
}

/* Platforms */
.platforms-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 4rem;
    flex-wrap: wrap;
}

.platform-item {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.platform-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.platform-item img {
    width: 24px;
    height: 24px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.platform-item:hover img {
    opacity: 1;
}

/* Results */
.results-container {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
}

.video-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.video-thumb {
    width: 180px;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.video-info {
    flex: 1;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
}

.download-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dl-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dl-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.dl-btn.audio {
    background: rgba(236, 72, 153, 0.1);
    color: #f472b6;
    border-color: rgba(236, 72, 153, 0.3);
}

.dl-btn.audio:hover {
    background: #ec4899;
    color: white;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading */
.loading-container {
    text-align: center;
    margin: 2rem 0;
    color: var(--text-muted);
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.5rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Container */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
    pointer-events: auto;
    min-width: 280px;
    max-width: 400px;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: auto;
}

/* Mobile */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .video-card {
        flex-direction: column;
    }

    .video-thumb {
        width: 100%;
        aspect-ratio: 16/9;
    }

    .search-box-wrapper {
        flex-direction: column;
        padding: 1rem;
        border-radius: 12px;
    }

    .action-button {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }

    .search-box input {
        padding-left: 2.5rem;
    }

    .input-icon {
        left: 0.5rem;
    }

    #toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast {
        min-width: unset;
        max-width: unset;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}