/* YoyoMedia Photo AI - Core Design System */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --accent-color: #ec4899;
    --gradient-bg: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    --gradient-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 50%, #db2777 100%);
    --dark-bg: #0f172a;
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-soft: 0 10px 30px rgba(99, 102, 241, 0.1);
    --shadow-hover: 0 20px 40px rgba(99, 102, 241, 0.2);
    --radius-lg: 20px;
    --radius-md: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Navbar Header */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    transition: all 0.3s ease;
}
.nav-container { display: flex; align-items: center; justify-content: space-between; gap: 15px; }

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    letter-spacing: -0.02em;
}
.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--gradient-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.logo-badge {
    background: #e0e7ff;
    color: var(--primary-color);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Desktop Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
    list-style: none;
}
.nav-links li { position: relative; }
.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.nav-links a:hover {
    color: var(--primary-color);
    background: #f1f5f9;
}
.nav-links a.active {
    color: var(--primary-color);
    font-weight: 700;
    background: #e0e7ff;
}

.cta-pill {
    background: var(--gradient-bg) !important;
    color: #fff !important;
    padding: 9px 20px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.cta-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35) !important;
}

/* Mobile Toggle Hamburger Button */
.mobile-toggle {
    display: none;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.25rem;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mobile-toggle:hover { background: #e2e8f0; color: var(--primary-color); }

/* Mobile Drawer Overlay Menu */
.mobile-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-backdrop.open { display: block; opacity: 1; }

.mobile-drawer {
    position: fixed;
    top: 0; right: -320px;
    width: 300px;
    height: 100%;
    background: #ffffff;
    z-index: 999;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.mobile-drawer.open { right: 0; }

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.mobile-drawer-close {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mobile-nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    border-radius: 10px;
    transition: background 0.2s;
}
.mobile-nav-links a:hover, .mobile-nav-links a.active {
    background: #f1f5f9;
    color: var(--primary-color);
}
.mobile-drawer-cta {
    margin-top: auto;
    padding-top: 20px;
}
.mobile-drawer-cta a {
    display: block;
    text-align: center;
    width: 100%;
}

/* Hero Section */
.hero { text-align: center; padding: 45px 20px 30px; }
.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.25;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 24px;
}

/* Upload Dropzone Container */
.dropzone-container {
    max-width: 680px;
    margin: 0 auto 35px;
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    position: relative;
}
.dropzone-container:hover, .dropzone-container.drag-over {
    border-color: var(--primary-color);
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.dropzone-icon {
    font-size: 3.2rem;
    color: var(--primary-color);
    margin-bottom: 14px;
}
.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--gradient-bg);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 15px;
}
.btn-upload:hover { transform: translateY(-2px); box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4); }

/* Processing Status & Estimated Timer Progress Bar */
.processing-status {
    display: none;
    text-align: center;
    padding: 36px 24px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    max-width: 600px;
    margin: 20px auto;
}
.spinner {
    width: 48px; height: 48px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.progress-container {
    width: 100%;
    max-width: 420px;
    margin: 16px auto 10px;
    background: #e2e8f0;
    border-radius: 50px;
    height: 10px;
    overflow: hidden;
    position: relative;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-bg);
    border-radius: 50px;
    transition: width 0.3s ease;
}
.progress-status-text {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 10px;
}
.estimated-timer {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* Before/After Comparison Slider & Overlay Labels */
.result-section { display: none; margin: 40px auto; max-width: 900px; text-align: center; }
.ba-slider {
    position: relative;
    width: 100%;
    max-height: 600px;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-hover);
    margin-bottom: 25px;
    user-select: none;
}
.ba-slider img { width: 100%; height: auto; display: block; }
.ba-after-img {
    position: absolute;
    top: 0; left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
}
.ba-after-img img { width: 1000px; max-width: none; }
.ba-handle {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 4px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    cursor: ew-resize;
}
.ba-handle-circle {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    background: #fff;
    color: var(--text-main);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.ba-label {
    position: absolute;
    top: 16px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    backdrop-filter: blur(8px);
}
.ba-label-before {
    left: 16px;
    background: rgba(15, 23, 42, 0.8);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.2);
}
.ba-label-after {
    right: 16px;
    background: rgba(99, 102, 241, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.3);
}

/* Tools Grid Section */
.tools-section { padding: 50px 0; }
.section-header { text-align: center; margin-bottom: 36px; }
.section-header h2 { font-size: 2rem; font-weight: 800; }
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.tool-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 24px 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--primary-color); }
.tool-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: #f1f5f9;
    color: var(--primary-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 16px;
}

/* AdSense Slot Containers */
.ad-slot-container {
    margin: 24px auto;
    text-align: center;
    overflow: hidden;
    min-height: 90px;
}

/* Floating Feedback Drawer Modal */
.feedback-pill-btn {
    position: fixed;
    bottom: 24px; right: 24px;
    background: var(--gradient-bg);
    color: #fff;
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 997;
    border: none;
}
.feedback-drawer {
    display: none;
    position: fixed;
    bottom: 80px; right: 24px;
    width: 340px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-hover);
    padding: 24px;
    z-index: 1000;
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: #94a3b8;
    padding: 50px 0 30px;
    margin-top: 80px;
}
footer a { color: #cbd5e1; text-decoration: none; }
footer a:hover { color: #fff; }

/* Responsive Media Queries */
@media (max-width: 1080px) {
    .nav-links { gap: 8px; }
    .nav-links a { font-size: 0.88rem; padding: 6px 10px; }
}

@media (max-width: 920px) {
    .nav-links { display: none; }
    .mobile-toggle { display: flex; }
}

@media (max-width: 640px) {
    .hero { padding: 30px 15px; }
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .dropzone-container { padding: 30px 16px; }
    .btn-upload { width: 100%; justify-content: center; }
    .feedback-pill-btn { bottom: 16px; right: 16px; padding: 10px 18px; font-size: 0.85rem; }
}
