:root {
    --primary: #ff0000;
    --primary-glow: rgba(255, 0, 0, 0.5);
    --secondary: #2196f3;
    --background: #0f0f0f;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-dim: #b1b1b1;
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #4caf50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

/* Background Animated Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
}

.blob {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    opacity: 0.2;
    animation: move 20s infinite alternate;
}

.blob-1 {
    background: var(--primary);
    top: -10%;
    left: -10%;
}

.blob-2 {
    background: var(--secondary);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    background: #9c27b0;
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(10%, 10%) scale(1.1); }
}

/* Container */
.container {
    width: 100%;
    max-width: 650px;
    padding: 2rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo i {
    font-size: 3rem;
    color: var(--primary);
    filter: drop-shadow(0 0 15px var(--primary-glow));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo h1 span {
    color: var(--primary);
    font-weight: 300;
}

.subtitle {
    color: var(--text-dim);
    font-size: 1.1rem;
}

/* Cards & Glassmorphism */
.glass-effect {
    background: var(--card-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card {
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Search Section */
.input-group {
    display: flex;
    gap: 1rem;
}

#video-url {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

#video-url:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.2);
}

/* Buttons */
.btn-primary, .btn-download {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary:hover, .btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--primary-glow);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.1);
}

/* Video Info Section */
.video-preview {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.thumbnail-wrapper {
    position: relative;
    flex-shrink: 0;
}

#video-thumbnail {
    width: 220px;
    border-radius: 16px;
    object-fit: cover;
}

.badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.video-details h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.uploader-name {
    color: var(--text-dim);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Download Options */
.download-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.custom-select select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem;
    color: white;
    outline: none;
    cursor: pointer;
    appearance: none;
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

.action-buttons button {
    flex: 1;
}

/* Progress Section */
.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.progress-bar-container {
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-meta {
    display: flex;
    gap: 2rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Success Message */
.success-message {
    padding: 3rem;
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(76, 175, 80, 0.3));
}

.success-message h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

#success-filename {
    color: var(--text-dim);
    margin-bottom: 2rem;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    margin-left: 5px;
    box-shadow: 0 0 5px var(--success);
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .logo i {
        font-size: 2.2rem;
    }

    .logo h1 {
        font-size: 1.8rem;
    }

    .input-group {
        flex-direction: column;
    }

    .video-preview {
        flex-direction: column;
        gap: 1rem;
    }
    
    #video-thumbnail {
        width: 100%;
    }
    
    .download-options {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}
