/*
Theme Name: YT Downloader
Theme URI: https://example.com/yt-downloader
Author: Your Name
Author URI: https://example.com
Description: A modern YouTube video and audio downloader theme
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yt-downloader
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

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

:root {
    --primary: #ff0000;
    --primary-dark: #cc0000;
    --secondary: #282828;
    --bg: #0f0f0f;
    --card-bg: #1a1a1a;
    --text: #ffffff;
    --text-secondary: #aaaaaa;
    --border: #333333;
    --success: #4caf50;
    --gradient: linear-gradient(135deg, #ff0000 0%, #ff6b6b 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
}

.logo i {
    color: var(--primary);
    font-size: 32px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover,
.nav a.active {
    color: var(--text);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 0 40px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 15px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Download Box */
.download-box {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
}

.input-group {
    display: flex;
    align-items: center;
    background: var(--secondary);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 25px;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.input-group:focus-within {
    border-color: var(--primary);
}

.input-group i {
    color: var(--text-secondary);
    padding: 0 15px;
    font-size: 18px;
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 16px;
    padding: 15px 0;
    outline: none;
}

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

.paste-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.paste-btn:hover {
    color: #ff6b6b;
}

/* Format Selection */
.format-selection {
    margin-bottom: 25px;
}

.format-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.format-tab {
    flex: 1;
    padding: 15px;
    background: var(--secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.format-tab:hover {
    color: var(--text);
}

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

.format-tab i {
    font-size: 18px;
}

/* Options Panel */
.options-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.options-panel.hidden {
    display: none;
}

.options-panel label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    grid-column: span 1;
}

.options-panel select {
    grid-column: span 1;
    padding: 12px 15px;
    background: var(--secondary);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.options-panel select:focus {
    border-color: var(--primary);
}

.options-panel select option {
    background: var(--secondary);
}

/* Download Button */
.download-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

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

.download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Preview Section */
.preview-section {
    padding: 40px 0;
}

.preview-section.hidden {
    display: none;
}

.video-preview {
    display: flex;
    gap: 30px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

.video-preview img {
    width: 320px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
}

.video-info {
    flex: 1;
}

.video-info h3 {
    font-size: 22px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.video-info p {
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Download Progress */
.download-progress {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border);
}

.download-progress.hidden {
    display: none;
}

.progress-bar {
    height: 10px;
    background: var(--secondary);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: var(--gradient);
    width: 0%;
    transition: width 0.3s;
    border-radius: 5px;
}

/* Features Section */
.features {
    padding: 80px 0;
}

.features h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

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

.feature-card {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border);
    transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.feature-card i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-secondary);
}

/* How It Works */
.how-it-works {
    padding: 80px 0;
}

.how-it-works h2 {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
}

.steps {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    max-width: 250px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.step i {
    font-size: 50px;
    color: var(--primary);
    margin-bottom: 20px;
    display: block;
    background: var(--card-bg);
    width: 100px;
    height: 100px;
    line-height: 100px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.step h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.step p {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.footer .disclaimer {
    font-size: 12px;
    margin-top: 10px;
    opacity: 0.7;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    padding: 15px 30px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .download-box {
        padding: 25px;
    }

    .options-panel {
        grid-template-columns: 1fr;
    }

    .options-panel label,
    .options-panel select {
        grid-column: span 1;
    }

    .video-preview {
        flex-direction: column;
    }

    .video-preview img {
        width: 100%;
        height: auto;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step {
        max-width: 100%;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}
