/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* Navbar Styles */
.navbar {
    background: linear-gradient(to right, #ff0000, #cc0000);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 20px;
}

.youtube-logo {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

#header {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* Main Container */
.container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

.url-input-container {
    position: relative;
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #ff0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
    background: white;
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #ff6b6b;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #ff5252;
    transform: translateY(-50%) scale(1.1);
}

/* Buttons */
.fetch-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(to right, #ff0000, #ff5252);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.fetch-btn:hover {
    background: linear-gradient(to right, #cc0000, #ff0000);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.2);
}

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

/* Loading Animation */
.loading-container {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Thumbnail Preview */
.thumbnail-preview {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #ddd;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.thumbnail-preview img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.thumbnail-preview img:hover {
    transform: scale(1.02);
}

/* Quality Options */
.quality-options {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
    color: white;
}

.quality-options h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quality-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.quality-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.quality-btn:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.quality-btn i {
    font-size: 24px;
    color: #ff0000;
}

/* Instructions & Info Box */
.instructions, .info-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin: 30px 0;
}

.instructions h2, .info-box h3 {
    color: #ff0000;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ol, .info-box ul {
    margin-left: 20px;
}

.instructions li, .info-box li {
    margin-bottom: 10px;
    padding-left: 10px;
}

.instructions li i, .info-box li i {
    color: #ff0000;
    margin-right: 10px;
}

/* Feature Section */
.feature-section {
    margin-top: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    color: white;
}

.feature-section h3 {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 40px;
    color: #ff0000;
    margin-bottom: 15px;
}

.feature-card h4 {
    color: #333;
    margin-bottom: 15px;
}

.feature-btn {
    background: #ff0000;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.feature-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: linear-gradient(to right, #2c3e50, #4a235a);
    color: white;
    padding: 40px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

footer p {
    font-size: 18px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.social-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 15px;
        padding: 20px;
    }
    
    #header {
        font-size: 20px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .quality-buttons {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Dark Theme */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #2c3e50 0%, #4a235a 100%);
        color: #f0f0f0;
    }
    
    .container {
        background: #34495e;
        color: #f0f0f0;
    }
    
    .form-control {
        background: #2c3e50;
        border-color: #4a6278;
        color: #f0f0f0;
    }
    
    .instructions, .info-box {
        background: #2c3e50;
    }
}