:root {
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --accent-color: #8b5cf6;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

body.dark-theme {
    background-color: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.15) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Navbar */
.custom-navbar {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

.brand-icon {
    font-size: 1.8rem;
    color: #eab308;
    filter: drop-shadow(0 0 8px rgba(234, 179, 8, 0.5));
    animation: pulseGlow 2s infinite alternate;
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glass Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Typography elements */
.gradient-text {
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Form & Input */
.search-form {
    border-radius: 3rem;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    padding: 0.4rem;
    transition: all 0.3s ease;
}

.search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.link-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
    z-index: 5;
}

.custom-input {
    background: transparent !important;
    border: none;
    color: var(--text-primary) !important;
    padding-left: 3.5rem;
    padding-right: 1rem;
    height: 3.5rem;
    font-size: 1.1rem;
    box-shadow: none !important;
}

.custom-input::placeholder {
    color: var(--text-secondary);
}

/* Buttons */
.custom-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 2rem;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent-color);
    color: white;
}

/* Preview Section */
.thumbnail-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    display: inline-block;
}

.thumbnail-wrapper img {
    width: 100%;
    transition: transform 0.5s ease;
}

.thumbnail-wrapper:hover img {
    transform: scale(1.05);
}

.duration-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Tabs */
.custom-tabs {
    background: rgba(0,0,0,0.2);
    padding: 0.3rem;
    border-radius: 1rem;
    display: inline-flex;
}

.custom-tabs .nav-link {
    color: var(--text-secondary);
    border-radius: 0.8rem;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s;
}

.custom-tabs .nav-link.active {
    background: var(--primary-color);
    color: white;
}

/* Download option item */
.dl-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 0.8rem;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.dl-option:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--primary-color);
    color: white;
}

/* Cool Download Button Animation */
.dl-btn {
    position: relative;
    overflow: hidden;
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.dl-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    transition: width 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: -1;
}

.dl-btn:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px -5px rgba(59, 130, 246, 0.5);
}

.dl-btn:hover::before {
    width: 100%;
}

.dl-btn:active {
    transform: translateY(0);
}

.dl-btn.downloading .dl-icon {
    animation: bounce 1s infinite;
}

/* Animations */
@keyframes pulseGlow {
    from { filter: drop-shadow(0 0 5px rgba(234, 179, 8, 0.4)); }
    to { filter: drop-shadow(0 0 15px rgba(234, 179, 8, 0.8)); transform: scale(1.05); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

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