/*
Theme Name: AI YouTube Thumbnail Downloader
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: A fast, lightweight WordPress theme for AI-powered YouTube thumbnail downloader tool. Optimized for speed, SEO, and Google AdSense approval.
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-thumb-ai
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

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

:root {
    --primary-color: #FF0000;
    --secondary-color: #282828;
    --accent-color: #065FD4;
    --text-dark: #0f0f0f;
    --text-light: #606060;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --border-color: #e5e5e5;
    --success-color: #0f9d58;
    --error-color: #d93025;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
}

/* ========================================
   Header Styles
======================================== */
.site-header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo .ai-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation Menu */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    padding: 0.5rem;
    z-index: 1001;
    transition: var(--transition);
}

.menu-toggle.active {
    color: var(--primary-color);
}

/* ========================================
   Main Content Area
======================================== */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 20px;
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-section .ai-powered-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.hero-section .ai-powered-badge::before {
    content: '🤖';
    font-size: 1.2rem;
}

.hero-section p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Tool Container */
.tool-container {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.input-wrapper {
    display: flex;
    gap: 10px;
}

.input-wrapper input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(6, 95, 212, 0.1);
}

.btn {
    padding: 14px 28px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-align: center;
    justify-content: center;
}

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

.btn-primary:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Results Section */
.results-section {
    margin-top: 2rem;
    display: none;
}

.results-section.active {
    display: block;
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.thumbnail-card {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 1rem;
    transition: var(--transition);
}

.thumbnail-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.thumbnail-card img {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.thumbnail-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.quality-badge {
    background-color: var(--secondary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.download-btn {
    width: 100%;
    padding: 10px;
    background-color: var(--success-color);
    color: white;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.download-btn:hover {
    background-color: #0d8849;
}

/* Info Section */
.info-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.info-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.info-section p {
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   Footer Styles
======================================== */
.site-footer {
    background-color: var(--secondary-color);
    color: #aaa;
    padding: 2rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #aaa;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    font-size: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid #444;
}

/* ========================================
   Cookie Consent Banner
======================================== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(40, 40, 40, 0.98);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
    z-index: 9999;
    display: none;
}

.cookie-consent.show {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-content p {
    flex: 1;
    margin: 0;
    font-size: 0.95rem;
}

.cookie-content a {
    color: #4fc3f7;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
}

.cookie-btn {
    padding: 10px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.cookie-accept {
    background-color: var(--success-color);
    color: white;
}

.cookie-accept:hover {
    background-color: #0d8849;
}

.cookie-decline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.cookie-decline:hover {
    background-color: rgba(255,255,255,0.1);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .main-navigation {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: var(--bg-white);
        box-shadow: var(--shadow-md);
        display: none;
        overflow-y: auto;
        z-index: 999;
        animation: slideDown 0.3s ease-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        display: block;
        padding: 1.2rem 20px;
        font-size: 1rem;
    }
    
    .main-navigation a::after {
        display: none;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .tool-container {
        padding: 1.5rem;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .site-main {
        padding: 2rem 15px;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
    
    .thumbnails-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Utility Classes
======================================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Loading Spinner */
.spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* Alert Messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}
