/* ===================================
   FINEHORA - YouTube Thumbnail Downloader
   Main Stylesheet
   Colors: #ff0000 (Red) | #2b2b2b (Dark Gray)
   =================================== */

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

:root {
    /* Colors */
    --primary-color: #ff0000;
    --secondary-color: #2b2b2b;
    --hover-primary: #cc0000;
    --background: #ffffff;
    --text-primary: #2b2b2b;
    --text-secondary: #666666;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --error-color: #dc3545;
    --light-gray: #f8f9fa;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    
    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px 0;
    
    /* Transitions */
    --transition-smooth: all 0.3s ease;
    --transition-fast: all 0.2s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--background);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

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

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

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

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

/* ===================================
   HEADER
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition-smooth);
}

.header.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-secondary);
}

.logo-icon {
    font-size: 2rem;
}

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

.logo-highlight {
    color: var(--primary-color);
}

.nav-list {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition-smooth);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: var(--transition-smooth);
    border-radius: 3px;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    position: relative;
    background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%);
    padding: 180px 0 100px;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 0, 0, 0.1) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    color: white;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Tool Box */
.tool-box {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

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

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

.url-input {
    width: 100%;
    padding: 18px 20px 18px 55px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition-smooth);
}

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

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

/* Error & Loading */
.error-message {
    color: var(--error-color);
    background: rgba(220, 53, 69, 0.1);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    animation: shake 0.5s ease;
}

.error-message.show {
    display: block;
}

.loading-spinner {
    display: none;
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 0, 0, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

.loading-spinner.show {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Result Section */
.result-section {
    display: none;
    margin-top: 40px;
}

.result-section.show {
    display: block;
}

.result-title {
    color: white;
    text-align: center;
    margin-bottom: 30px;
}

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

.thumbnail-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
    animation: fadeInUp 0.5s ease;
}

.thumbnail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.thumbnail-image {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 15px;
}

.thumbnail-info {
    text-align: center;
}

.quality-label {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.resolution-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.download-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.download-btn:hover {
    background: var(--hover-primary);
    transform: scale(1.02);
}

/* ===================================
   BENEFITS SECTION
   =================================== */
.benefits {
    padding: var(--section-padding);
    background: var(--light-gray);
}

.section-title {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

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

.benefit-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition-smooth);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--hover-primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2rem;
    transition: var(--transition-smooth);
}

.benefit-card:hover .benefit-icon {
    transform: rotate(360deg) scale(1.1);
}

.benefit-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.benefit-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===================================
   HOW IT WORKS SECTION
   =================================== */
.how-it-works {
    padding: var(--section-padding);
    background: white;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.step {
    flex: 1;
    min-width: 200px;
    text-align: center;
    padding: 30px 20px;
    background: var(--light-gray);
    border-radius: 15px;
    position: relative;
    transition: var(--transition-smooth);
}

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

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin: 20px 0;
}

.step h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.step p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.step-arrow {
    color: var(--primary-color);
    font-size: 2rem;
}

/* ===================================
   SEO CONTENT SECTION
   =================================== */
.seo-content {
    padding: var(--section-padding);
    background: var(--light-gray);
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.content-article h2 {
    color: var(--secondary-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article h3 {
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.content-article h4 {
    color: var(--primary-color);
    margin-top: 25px;
    margin-bottom: 12px;
}

.content-article p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.content-article ul,
.content-article ol {
    margin: 20px 0 20px 30px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.content-article ul {
    list-style: disc;
}

.content-article ol {
    list-style: decimal;
}

.content-article li {
    margin-bottom: 12px;
}

.content-article strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-secondary);
    margin-bottom: 15px;
}

.footer-description {
    margin-bottom: 25px;
    line-height: 1.8;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition-smooth);
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px) scale(1.1);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-smooth);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   SECONDARY PAGES STYLES
   =================================== */
.page-header {
    background: linear-gradient(135deg, #2b2b2b 0%, #1a1a1a 100%);
    padding: 150px 0 80px;
    text-align: center;
    color: white;
}

.page-header h1 {
    color: white;
    margin-bottom: 15px;
}

.page-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.about-content,
.contact-content,
.legal-content {
    padding: var(--section-padding);
    background: var(--light-gray);
}

.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.mission-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition-smooth);
    text-align: center;
}

.mission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.mission-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--hover-primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--hover-primary));
    color: white;
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    margin-top: 50px;
}

.cta-box h3 {
    color: white;
    margin-bottom: 15px;
}

.cta-box p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

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

.cta-box .btn-primary:hover {
    background: var(--light-gray);
    transform: translateY(-3px);
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-smooth);
}

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

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.contact-info {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item-icon {
    width: 50px;
    height: 50px;
    background: var(--light-gray);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-item-content h3 {
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.contact-item-content p {
    color: var(--text-secondary);
    margin: 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

/* Legal Pages */
.legal-content .content-article {
    max-width: 1000px;
}

.legal-content .last-updated {
    background: var(--light-gray);
    padding: 15px 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ===================================
   RESPONSIVE
   =================================== */
@media (max-width: 968px) {
    .nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        transition: var(--transition-smooth);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 40px;
        gap: 20px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .steps-container {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 600px) {
    :root {
        --section-padding: 50px 0;
    }
    
    .hero {
        padding: 140px 0 60px;
    }
    
    .tool-box {
        padding: 20px;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .content-article {
        padding: 30px 20px;
    }
    
    .thumbnails-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .cta-box {
        padding: 30px 20px;
    }
}