:root {
    --primary: #4F46E5;
    --dark: #1E1B4B;
    --bg: #F3F4F6;
    --header-bg: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--bg); color: #1f2937; overflow-x: hidden; }

/* --- THE UNIFIED OVERLAY STYLES --- */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.hidden { display: none !important; }

/* Header Bar (Fixed Top) */
.overlay-header {
    height: 70px;
    background: var(--header-bg);
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    z-index: 10001; /* Above iframe */
    flex-shrink: 0;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.status-text {
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1rem;
}

/* Action Button (Skip/Download) */
.action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    min-width: 160px;
    text-align: center;
}

.action-btn.disabled {
    background: #9CA3AF;
    cursor: wait;
    opacity: 0.8;
}

/* Full Screen Iframe Container */
.iframe-container {
    flex: 1; /* Takes remaining height */
    width: 100%;
    position: relative;
    background: #f0f0f0;
    z-index: 10000;
}

iframe#smartlink-frame {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Standard Layout (Sidebar, Main) --- */
.navbar { background: white; padding: 15px; border-bottom: 1px solid #ddd; position: sticky; top: 0; z-index: 100; }
.nav-flex { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { display: flex; align-items: center; gap: 15px; }
.logo { font-weight: 800; color: var(--primary); text-decoration: none; font-size: 1.2rem; }
#menu-btn { border: none; background: none; font-size: 1.4rem; cursor: pointer; }

/* Sidebar */
.sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100%; background: white; z-index: 1000; transition: 0.3s; box-shadow: 2px 0 10px rgba(0,0,0,0.1); }
.sidebar.active { left: 0; }
.sidebar-header { padding: 20px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; }
#close-sidebar { border: none; background: none; font-size: 1.2rem; cursor: pointer; }
.sidebar-menu { list-style: none; padding: 20px; }
.tool-link { display: flex; gap: 10px; padding: 12px; text-decoration: none; color: #333; border-radius: 6px; margin-bottom: 5px; }
.tool-link.active, .tool-link:hover { background: #EEF2FF; color: var(--primary); }
.sidebar-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; display: none; }
.sidebar-backdrop.active { display: block; }

/* Content */
.hero-section { padding: 40px 20px; text-align: center; max-width: 800px; margin: 0 auto; }
.upload-container { border: 2px dashed #C7D2FE; background: white; padding: 40px; border-radius: 12px; margin-top: 30px; cursor: pointer; }
.preview-area, .result-area { background: white; padding: 25px; border-radius: 12px; margin-top: 30px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; margin: 20px 0; }
.preview-thumb { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; }
.btn-primary { background: var(--primary); color: white; border: none; padding: 10px 25px; border-radius: 6px; cursor: pointer; margin-top: 15px; font-weight: 600; }
.btn-action, .btn-download { display: block; width: 100%; padding: 15px; background: var(--dark); color: white; text-decoration: none; border: none; border-radius: 8px; margin-top: 10px; font-size: 1.1rem; cursor: pointer; }
.btn-download { background: #10B981; }

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

/* --- GDPR Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    background: #1f2937; /* Dark Grey */
    color: white;
    padding: 20px;
    border-radius: 12px;
    z-index: 20000; /* Higher than ads */
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease-out;
}

/* Ensure 'hidden' class works */
.cookie-banner.hidden {
    display: none !important;
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.cookie-content p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    color: #f3f4f6;
}

.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.btn-accept {
    background: #10B981; /* Green */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s;
}

.btn-accept:hover {
    background: #059669;
}

.cookie-link {
    color: #D1D5DB;
    text-decoration: underline;
    font-size: 0.85rem;
}

@keyframes slideUp {
    from { transform: translate(-50%, 100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Mobile Tweaks */
@media (max-width: 600px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

/* --- New Additions for Cartoon & Passport --- */
.style-selector {
    background: #F9FAFB;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    text-align: center;
}

.btn-style {
    background: white;
    border: 1px solid #E5E7EB;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-style:hover {
    background: #EEF2FF;
    border-color: #4F46E5;
    color: #4F46E5;
}

/* --- QuickConvert Footer Styles --- */
.qc-footer {
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding-top: 50px;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

.qc-footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.qc-footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #4F46E5; /* Indigo */
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.qc-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.qc-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.qc-nav-list li a {
    text-decoration: none;
    color: #374151;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.2s;
}

.qc-nav-list li a:hover { color: #4F46E5; }

/* Tools Section */
.qc-tools-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    font-size: 0.85rem;
    color: #6B7280;
}

.qc-tools-list span { font-weight: 700; color: #111827; }
.qc-tools-list a { text-decoration: none; color: #6B7280; }
.qc-tools-list a:hover { color: #4F46E5; text-decoration: underline; }

/* Social Icons */
.qc-social-icons {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.qc-social-icons a {
    color: #374151;
    font-size: 1.2rem;
    transition: transform 0.2s, color 0.2s;
}

.qc-social-icons a:hover {
    color: #4F46E5;
    transform: translateY(-3px);
}

/* Copyright Bar */
.qc-copyright {
    background-color: #1f2937; /* Dark Grey/Black */
    color: #9CA3AF;
    padding: 20px 0;
    font-size: 0.85rem;
    margin-top: 10px;
}

/* =========================================
   ABOUT PAGE SPECIFIC STYLES
   ========================================= */

/* Background reset for reading */
body.about-page {
    background-color: #ffffff;
    color: #1f2937;
}

/* 1. Centralized Navbar */
.about-navbar {
    display: flex;
    justify-content: center; /* Centers the logo */
    padding: 25px 0;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 40px;
}

.brand-identity {
    font-size: 1.5rem;
    font-weight: 800;
    color: #4F46E5;
    text-decoration: none;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

/* 2. The Narrow Container (The Fix for "Too Wide") */
.about-wrapper {
    max-width: 768px; /* Standard article width */
    margin: 0 auto;   /* Centers the block */
    padding: 0 20px 80px 20px; /* Padding for mobile sides */
}

/* 3. Hero Typography */
.about-hero {
    text-align: center;
    margin-bottom: 40px;
}

.about-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -1px;
    color: #111827;
}

.lead-text {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #4B5563;
    font-weight: 300;
}

.divider {
    border: 0;
    height: 1px;
    background: #e5e7eb;
    margin: 40px auto;
    width: 100px; /* Small centered line */
}

/* 4. Content Formatting */
.about-content h2 {
    font-size: 1.8rem;
    margin-top: 50px;
    margin-bottom: 20px;
    color: #111827;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8; /* Breathable reading space */
    color: #374151;
    margin-bottom: 25px;
}

/* 5. Philosophy Box (Modern UI Element) */
.philosophy-card {
    background: #F9FAFB;
    border-left: 5px solid #4F46E5;
    padding: 30px;
    border-radius: 0 8px 8px 0;
    margin: 40px 0;
}

.philosophy-card h3 {
    margin-top: 0;
    color: #4F46E5;
}

.philosophy-card ul {
    margin: 15px 0 0 20px;
    padding: 0;
}

.philosophy-card li {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

/* 6. Profile Card (John Favour) */
.profile-card {
    display: flex;
    align-items: center;
    gap: 25px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: #4F46E5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-avatar span {
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.profile-info h3 {
    margin: 0;
    font-size: 1.4rem;
}

.role-badge {
    display: inline-block;
    background: #EEF2FF;
    color: #4F46E5;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    margin: 5px 0 10px 0;
}

.profile-info p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: #6B7280;
}

.profile-socials a {
    color: #9CA3AF;
    font-size: 1.2rem;
    margin-right: 15px;
    transition: 0.2s;
}

.profile-socials a:hover {
    color: #4F46E5;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .about-hero h1 { font-size: 2.2rem; }
    .profile-card { flex-direction: column; text-align: center; }
    .about-content h2 { font-size: 1.5rem; }
}

/* Update the container to remove padding/background */
.profile-avatar {
    width: 90px;       /* Fixed width */
    height: 90px;      /* Fixed height */
    border-radius: 50%;
    overflow: hidden;  /* Cuts off corners to make it round */
    padding: 0;        /* Remove padding */
    background: #f3f4f6; /* Optional placeholder color */
    border: 1px solid #4F46E5; /* Optional: Nice border ring */
}

/* The Image Style */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes it fit perfectly without stretching */
    display: block;
}

/* --- Dual Button Layout --- */
.action-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

/* Option 1: Standard (No Ad) */
.btn-standard {
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #D1D5DB;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s;
    width: 100%;
}
.btn-standard:hover { background: #E5E7EB; }

/* Option 2: Premium (Ad Supported) */
.btn-premium {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-premium:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4); }

/* Badge for Ad */
.ad-badge {
    background: #FFD700;
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 800;
    text-transform: uppercase;
}

@media (min-width: 600px) {
    .action-buttons-container { flex-direction: row; }
}