/* YouTube to MP3 Converter - Modern CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    text-align: center;
    padding: 20px 0;
    font-size: 2.5rem;
    color: #2c3e50;
    font-weight: 700;
}

header h1 a {
    text-decoration: none;
    color: inherit;
}

.tagline {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Main Content */
main {
    padding: 40px 0;
}

.converter-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    text-align: center;
}

.converter-section h2 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* Form Styles */
.converter-form {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.input-group input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 50px;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 300px;
}

.input-group input:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.1);
}

.convert-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.convert-btn:hover {
    background: #0056b3;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.convert-btn:active {
    transform: translateY(1px);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin: 20px 0;
    font-weight: 500;
}

.alert.error {
    background: #ffe6e6;
    color: #d63031;
    border: 1px solid #fab1a0;
}

.alert.success {
    background: #e6f7e6;
    color: #00b894;
    border: 1px solid #55efc4;
}

/* Video Preview */
.video-preview {
    margin-top: 30px;
    text-align: left;
}

.video-info {
    display: flex;
    gap: 20px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.video-thumbnail {
    width: 120px;
    height: 90px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.video-details {
    flex: 1;
    min-width: 200px;
}

.video-details h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
}

.duration {
    color: #666;
    margin-bottom: 10px;
}

.channel {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.views {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.download-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.download-btn:hover {
    background: #218838;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

/* Features Section */
.features-section {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.features-section h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: #2c3e50;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.how-it-works h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: #2c3e50;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 30px 20px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.step p {
    color: #666;
    line-height: 1.6;
}

/* Footer */
footer {
    background: #343a40;
    color: white;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .converter-section {
        padding: 30px 20px;
    }
    
    .converter-section h2 {
        font-size: 1.8rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .input-group input {
        min-width: auto;
    }
    
    .video-info {
        flex-direction: column;
        text-align: center;
    }
    
    .video-thumbnail {
        width: 200px;
        height: 150px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .steps {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .converter-section {
        padding: 20px 15px;
    }
    
    .converter-section h2 {
        font-size: 1.5rem;
    }
    
    .features-section,
    .how-it-works {
        padding: 30px 20px;
    }
    
    .features-section h2,
    .how-it-works h2 {
        font-size: 1.8rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4ecdc4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles for Accessibility */
button:focus,
input:focus {
    outline: 2px solid #4ecdc4;
    outline-offset: 2px;
}

/* Page Content Styles */
.page-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    line-height: 1.8;
}

.page-content h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.page-content h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 30px 0 15px 0;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.page-content h3 {
    font-size: 1.4rem;
    color: #34495e;
    margin: 25px 0 10px 0;
}

.page-content p {
    margin-bottom: 15px;
    color: #555;
}

.page-content ul {
    margin: 15px 0;
    padding-left: 30px;
}

.page-content li {
    margin-bottom: 8px;
    color: #555;
}

/* Contact Page Styles */
.contact-info {
    margin: 30px 0;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.contact-method {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.contact-method h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

/* FAQ Styles */
.faq-section {
    margin: 40px 0;
}

.faq-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    border-left: 4px solid #007bff;
}

.faq-item h3 {
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Error Page Styles */
.error-page {
    text-align: center;
    padding: 60px 0;
}

.error-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 60px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    max-width: 600px;
    margin: 0 auto;
}

.error-content h1 {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 30px;
}

.error-actions {
    margin: 30px 0;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    margin: 0 10px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: transparent;
    color: #666;
    border: 2px solid #666;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.popular-links {
    margin-top: 40px;
    text-align: left;
}

.popular-links h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.popular-links ul {
    list-style: none;
    padding: 0;
}

.popular-links li {
    margin: 10px 0;
}

.popular-links a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.popular-links a:hover {
    color: #0056b3;
}

/* Print Styles */
@media print {
    header,
    footer,
    .convert-btn,
    .download-btn {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .converter-section,
    .features-section,
    .how-it-works,
    .page-content,
    .error-content {
        box-shadow: none;
        background: white;
    }
}
