/* style.css for YouTube Video Downloader */
:root {
    --primary: #ff0000;
    --primary-dark: #cc0000;
    --secondary: #282828;
    --accent: #f8f9fa;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --border-radius: 12px;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.logo i {
    font-size: 3rem;
    color: var(--primary);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Card */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 40px;
    margin-bottom: 30px;
}

/* Input Section */
.input-section h2 {
    color: var(--secondary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
}

.input-section h2 i {
    color: var(--primary);
}

.input-group {
    margin-bottom: 25px;
}

.input-with-icon {
    position: relative;
    margin-bottom: 15px;
}

.input-with-icon i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.2rem;
}

.input-with-icon input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    font-size: 1.1rem;
    border: 2px solid #e1e5e9;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.input-help {
    background: var(--accent);
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.input-help p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-help i {
    color: var(--info);
}

.input-help code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    border: 1px solid #ddd;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.2);
}

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

.btn-secondary {
    padding: 12px 24px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Loading */
.loading {
    text-align: center;
    padding: 30px;
    display: none;
}

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

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

/* Result Section */
.result-section {
    display: none;
    background: var(--accent);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    border: 2px dashed #28a745;
}

.video-preview {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.thumbnail {
    flex: 0 0 200px;
}

.thumbnail img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.video-details {
    flex: 1;
    min-width: 300px;
}

.video-details h3 {
    margin-bottom: 15px;
    color: var(--secondary);
    font-size: 1.3rem;
}

.detail-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-item i {
    color: var(--primary);
    width: 20px;
}

.download-options {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.download-options h4 {
    margin-bottom: 15px;
    color: var(--secondary);
}

.format-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.format-btn {
    padding: 10px 20px;
    background: var(--light);
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.format-btn:hover {
    background: #e9ecef;
}

.format-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Error Section */
.error-section {
    display: none;
    background: #fee;
    border: 2px dashed var(--danger);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
}

.error-section h3 {
    color: var(--danger);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Info Box */
.info-box {
    background: #e7f3ff;
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    border-left: 5px solid var(--info);
}

.info-box h3 {
    color: var(--info);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-box ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.info-box li {
    margin-bottom: 8px;
}

.example {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.example ul {
    list-style: none;
    margin-left: 0;
}

.example li {
    margin-bottom: 5px;
    font-family: 'Courier New', monospace;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

.highlight {
    background: yellow;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* Disclaimer */
.disclaimer {
    background: #fff3cd;
    border-radius: var(--border-radius);
    padding: 25px;
    border-left: 5px solid var(--warning);
}

.disclaimer h4 {
    color: #856404;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.disclaimer ul {
    margin-left: 20px;
    margin: 15px 0 15px 20px;
}

.disclaimer li {
    margin-bottom: 8px;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 20px;
    opacity: 0.8;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    opacity: 0.8;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.footer-links a:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        padding: 25px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .video-preview {
        flex-direction: column;
    }
    
    .thumbnail {
        flex: 0 0 auto;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .input-with-icon input {
        font-size: 1rem;
        padding: 15px 15px 15px 45px;
    }
    
    .btn-primary {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
}