:root {
    --primary-color: #00c6fb;
    /* Bright Blue */
    --secondary-color: #005bea;
    /* Deep Blue */
    --accent-green: #43e97b;
    /* Green */
    --text-main: #333;
    --paper-bg: #fff;
    --nav-height: 60px;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background: #ffffff;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* NAVBAR */
.navbar {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0;
    height: var(--nav-height);
    background: #fff;
    border-radius: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
    z-index: 100;
}

.nav-logo {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    /* Fix lint */
    -webkit-text-fill-color: transparent;
    animation: zoomMove 4s ease-in-out infinite;
    display: inline-block;
    transition: transform 0.3s;
}

.nav-logo:hover {
    filter: brightness(1.2);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-icon {
    color: #333;
    display: flex;
    align-items: center;
}

/* MAIN WRAPPER */
.main-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* LANDING PAGE with ANIMATED GRADIENT */
.landing-section {
    /* Blue to Green Gradient */
    background: linear-gradient(-45deg, #00c6fb, #005bea, #43e97b, #38f9d7);
    background-size: 400% 400%;
    animation: gradientBG 10s ease infinite;

    border-radius: 40px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    min-height: 600px;
}

/* Gradient Animation Keyframes */
@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.landing-notification {
    background: rgba(255, 255, 255, 0.7);
    /* Slightly more opaque for contrast on colorful bg */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.badge-new {
    background: #fff;
    border: 2px solid #000;
    border-radius: 50%;
    /* Star shape approximation via CSS is hard, circle is fine */
    font-weight: 900;
    font-size: 0.7rem;
    padding: 8px 6px;
    line-height: 1;
    transform: rotate(-10deg);
}

.notif-text {
    font-size: 0.85rem;
    color: #555;
    text-align: left;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    max-width: 1000px;
}

.hero-title {
    font-size: 5rem;
    font-weight: 400;
    /* Clean thin/regular look */
    letter-spacing: -2px;
    margin: 10px 0;
    color: #111;
}

.hero-subtitle {
    margin-bottom: 40px;
    color: #444;
    line-height: 1.5;
}

.est-label {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.est-label.left {
    left: -60px;
}

.est-label.right {
    right: -60px;
}

.btn-start-hero {
    background: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    padding: 15px 40px;
    border-radius: 30px;
    box-shadow: 0 10px 25px rgba(79, 172, 254, 0.4);
    /* Blue Shadow */
    border: none;
    transition: transform 0.2s;
}

.btn-start-hero:hover {
    transform: scale(1.05);
    background: #3594e8;
}

/* DECORATION MOCKUPS */
.deco-img {
    flex: 1;
    display: flex;
    justify-content: center;
}

.strip-mockup {
    width: 160px;
    background: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: rotate(-5deg);
    transition: transform 0.3s;
}

.strip-mockup:hover {
    transform: rotate(0deg) scale(1.05);
}

.rotate-right {
    transform: rotate(5deg);
}

.mock-photo {
    width: 100%;
    aspect-ratio: 4/3;
    background: #333;
    border: 2px solid #000;
}

/* ABOUT PAGE (Updated for Blue) */
.about-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 40px;
    padding: 60px 40px;
    flex: 1;
    display: flex;
    /* Initially hidden by JS */
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
    animation: fadeIn 0.5s ease-out;
}

.about-header-card,
.faq-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.about-header-card h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 20px;
    color: #222;
}

.about-header-card p {
    line-height: 1.6;
    color: #444;
    font-size: 0.95rem;
}

.faq-card h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.faq-item {
    margin-bottom: 30px;
    text-align: left;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.faq-item p,
.faq-item li {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

.faq-item ol {
    padding-left: 20px;
}

/* SPOTLIGHT GRID */
.spotlight-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    width: 100%;
    max-width: 900px;
}

.spot-item {
    flex: 1;
    min-width: 200px;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.spot-item:hover {
    transform: translateY(-5px);
}

/* CONTACT FORM */
.contact-form {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    background: #fafafa;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #fff;
}

/* LAYOUT SELECTION PAGE */
.layout-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
}

.layout-card {
    background: #fff;
    width: 200px;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
    /* For badge */
}

.badge-new {
    position: absolute;
    top: -10px;
    right: -10px;
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(255, 75, 43, 0.3);
    z-index: 10;
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.layout-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--primary-color);
}

.layout-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(1);
}

.layout-preview {
    width: 100px;
    height: 140px;
    background: #f4f4f4;
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    position: relative;
}

.layout-card h3 {
    font-size: 1.1rem;
    margin: 0;
}

.layout-card p {
    font-size: 0.8rem;
    color: #777;
    margin: 0;
}

/* Mini Previews */
.mini-strip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 80%;
}

.mini-photo {
    width: 100%;
    aspect-ratio: 4/3;
    background: #ccc;
    border: 1px solid #999;
}

.mini-newspaper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.mini-head {
    font-size: 8px;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    border-bottom: 1px solid #000;
}

.mini-photo-rect {
    width: 100%;
    height: 50%;
    background: #ccc;
    border: 1px solid #000;
}

.coming-soon {
    font-size: 0.7rem;
    font-weight: bold;
    color: #999;
    transform: rotate(-10deg);
}

/* NAV CTA */
.nav-cta {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}

/* APP INTERFACE */
.app-interface {
    flex: 1;
    width: 100%;
    background: #fff;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
    /* Exact match */
    animation: fadeIn 0.5s ease-out;
}

/* 2x2 GRID LAYOUT STYLES (Layout D) */
.photo-grid-2x2 {
    background: #fff;
    padding: 25px 20px;
    width: 320px;
    /* Wider than strip */
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    display: none;
    /* Controlled by JS */
    border-radius: 2px;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 columns */
    gap: 10px;
    width: 100%;
}

.grid-photo {
    width: 100%;
    aspect-ratio: 4/3;
    /* Webcam standard */
    background: #f0f0f0;
    overflow: hidden;
    border: 3px solid #000;
}

.grid-footer {
    text-align: center;
    margin-top: 5px;
}

.grid-footer h2 {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.5rem;
    color: #000;
    margin-bottom: 2px;
}

.grid-footer p {
    font-size: 0.8rem;
    color: #666;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

/* MINI GRID PREVIEW (Layout D Icon) */
.mini-grid {
    width: 80%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.mini-photo-sq {
    width: 100%;
    aspect-ratio: 1;
    background: #ccc;
    border: 1px solid #999;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.btn-back {
    background: transparent;
    color: #555;
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-weight: 600;
}

.btn-back:hover {
    background: #f9f9f9;
}

/* REUSE EXISTING STYLES WITH ADJUSTMENTS */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
}

/* Sections */
.camera-section {
    flex: 1;
    min-width: 350px;
}

.preview-section {
    flex: 1;
    min-width: 300px;
    /* Reduced for strip width */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Video */
.video-container {
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
    aspect-ratio: 4/3;
    position: relative;
    border: 4px solid #fff;
}

/* COUNTDOWN OVERLAY */
.countdown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 5rem;
    /* Reduced from 8rem */
    font-weight: 800;
    z-index: 10;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* FILTER CIRCLES */
.filter-circles {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 15px;
}

.filter-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 3px solid #fff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    object-fit: cover;
}

.filter-circle:hover {
    transform: scale(1.1);
}

.filter-circle.active {
    border-color: var(--primary-color);
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(0, 198, 251, 0.4);
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #fff;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Inputs & Buttons */
.control-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select,
input[type="text"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    background: #f9f9f9;
}

select:focus,
input[type="text"]:focus {
    border-color: var(--primary-color);
    background: #fff;
}

/* Radio Buttons Redesign */
.radio-group {
    display: flex;
    gap: 10px;
    background: #f0f4f8;
    padding: 5px;
    border-radius: 15px;
}

.radio-label {
    flex: 1;
    position: relative;
    cursor: pointer;
    text-align: center;
}

.radio-label input {
    display: none;
}

.radio-content {
    display: block;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.radio-label input:checked+.radio-content {
    background: #fff;
    color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


button {
    cursor: pointer;
    border: none;
    padding: 16px;
    border-radius: 50px;
    /* Pill shape */
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.5px;
}

.progress-indicator {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 5px;
}

/* MINI DOUBLE NEWS PREVIEW */
.mini-newspaper-double {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 2px;
}

.mini-photo-rect-small {
    width: 100%;
    height: 35%;
    background: #ccc;
    border: 1px solid #000;
}

.mini-row {
    display: flex;
    gap: 3px;
    height: 30%;
}

.mini-text-lines {
    flex: 1;
    background: repeating-linear-gradient(#eee, #eee 2px, transparent 2px, transparent 4px);
}

.mini-photo-rect-extra-small {
    width: 40%;
    height: 100%;
    background: #ccc;
    border: 1px solid #000;
}

.btn-capture-large {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    width: 200px;
    height: 60px;
    border-radius: 30px;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0, 198, 251, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-capture-large:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 117, 140, 0.4);
}

.btn-capture-large:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.main-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.btn-upload {
    background: #fff;
    color: #444;
    border: 2px solid #eee;
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-upload:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-reset {
    background: #f1f2f6;
    color: #7f8c8d;
    width: 100%;
}

.btn-download {
    background: #333;
    color: white;
    margin-top: 20px;
    width: 100%;
}

/* --- LAYOUTS --- */

/* 1. KORAN / NEWSPAPER */
.koran-paper {
    background: #fdfbf7;
    padding: 25px;
    border: 1px solid #d4d4d4;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 400px;
    color: #1a1a1a;
    display: none;
    /* Controlled by JS */
}

/* Reusing existing newspaper styles but ensuring they work inside this structure */
.paper-brand {
    font-family: 'Playfair Display', serif;
    border-bottom: 2px solid #333;
    text-align: center;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    /* Added size constraint */
}

.main-headline {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    /* Reduced from 2.5rem */
    text-align: center;
    margin: 12px 0;
    line-height: 1;
}

.paper-photo {
    width: 100%;
    margin: 15px 0;
    background: #eee;
    border: 1px solid #333;
    overflow: hidden;
}

.small-photo {
    width: 100%;
    margin: 5px 0;
    max-height: 120px;
}

#canvas {
    width: 100%;
    height: auto;
    display: block;
}

.newspaper-columns {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* KORAN V2 (DOUBLE NEWS) - PREMIUM REFINEMENT */
.koran-v2 {
    max-width: 420px !important;
    padding: 30px !important;
}

.koran-header-v2 {
    text-align: center;
    border-bottom: 2px solid #000;
    margin-bottom: 5px;
}

.brand-v2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    margin-bottom: 0px;
    line-height: 1.1;
}

.paper-meta-v2 {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    border-top: 1px solid #000;
    padding: 4px 0;
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
}

.headline-v2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 900;
    text-align: center;
    margin: 15px 0;
    letter-spacing: -1px;
}

.photo-main-v2 {
    width: 100%;
    aspect-ratio: 16/9;
    background: #f0f0f0;
    border: 1px solid #000;
    overflow: hidden;
    margin-bottom: 15px;
}

.photo-main-v2 canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-body-v2 {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.news-text-v2 {
    flex: 1.2;
    font-family: 'Times New Roman', serif;
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: justify;
}

.news-side-v2 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.photo-side-v2 {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f0f0f0;
    border: 1px solid #000;
    overflow: hidden;
}

.photo-side-v2 canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.side-caption-v2 {
    font-size: 0.6rem;
    font-style: italic;
    font-family: 'Inter', sans-serif;
    margin-top: 5px;
    text-align: center;
    color: #444;
}

/* 2. PHOTO STRIP (Minimalist Style) */
.photo-strip {
    background: #fff;
    padding: 25px 20px;
    width: 250px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    display: none;
    /* Controlled by JS */
    border-radius: 2px;
    /* Slight roundness just for feel, mostly sharp */
}

.strip-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Spacing between photos */
    width: 100%;
}

.strip-photo {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f0f0f0;
    overflow: hidden;
    border: 3px solid #000;
    /* Distinct border around each photo */
    position: relative;
}

.strip-photo canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.strip-footer {
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

.strip-footer h2 {
    font-family: 'Permanent Marker', cursive;
    transform: rotate(0deg);
    /* No rotation for clean look */
    color: #000;
    font-size: 1.8rem;
    margin-bottom: 2px;
}

.strip-footer p {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #444;
    margin-top: 2px;
    letter-spacing: 3px;
    font-weight: bold;
}

/* Flash & Animations */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
}

.flash-active {
    animation: flashAnim 0.3s ease-out;
}

@keyframes flashAnim {
    0% {
        opacity: 0.9;
    }

    100% {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomMove {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    25% {
        transform: scale(1.05) rotate(-2deg);
    }

    50% {
        transform: scale(1.1) rotate(2deg);
    }

    75% {
        transform: scale(1.05) rotate(-1deg);
    }
}

/* Helpers */
.city-banner {
    width: 100%;
    height: 100px;
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid #333;
}

.city-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

/* MOBILE RESPONSIVENESS & HAMBURGER MENU */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #333;
    transition: 0.3s;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .nav-icon {
        display: none;
    }

    .navbar {
        width: 95%;
        margin: 10px auto;
        padding: 0 20px;
        position: relative;
    }

    .menu-toggle {
        display: flex;
    }

    /* Animation for Hamburger to X */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        border-radius: 20px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-links.active {
        max-height: 400px;
        /* Adjust based on content */
        padding: 20px 0;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid #f9f9f9;
        font-size: 1rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-content {
        flex-direction: column;
        gap: 40px;
    }

    .landing-section {
        padding: 40px 20px;
        border-radius: 30px;
    }

    .layout-grid {
        gap: 15px;
    }

    .layout-card {
        width: 45%;
        /* 2 per row on small screens */
        padding: 15px;
    }

    .app-interface {
        padding: 20px;
        border-radius: 0;
    }

    .content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .camera-section {
        width: 100%;
        min-width: unset;
        order: 1;
    }

    .preview-section {
        width: 100%;
        min-width: unset;
        order: 2;
    }

    .video-container {
        margin-bottom: 15px;
    }

    .filter-circles {
        gap: 8px;
    }

    .filter-circle {
        width: 40px;
        height: 40px;
    }

    .koran-paper,
    .photo-grid-2x2,
    .photo-strip {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .countdown-overlay {
        font-size: 4rem;
    }
}

/* Smallest devices (iPhone SE, etc) */
@media (max-width: 380px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .layout-card {
        width: 100%;
        /* Stack on very small screens */
    }

    .nav-logo {
        font-size: 1.2rem;
    }
}

/* MANUAL CROP MODAL */
.crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    /* Controlled by JS */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.crop-container {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.crop-container h3 {
    text-align: center;
    font-size: 1.4rem;
    color: #333;
}

.crop-box {
    width: 100%;
    max-height: 400px;
    background: #eee;
    overflow: hidden;
    border-radius: 10px;
}

.crop-actions {
    display: flex;
    gap: 15px;
}

.btn-cancel {
    flex: 1;
    background: #f1f2f6;
    color: #444;
    padding: 12px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-apply {
    flex: 2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0, 198, 251, 0.3);
}

.btn-apply:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.app-footer-copyright {
    width: 100%;
    padding: 30px 0;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    margin-top: 40px;
    font-family: 'Inter', sans-serif;
}

.app-footer-copyright p {
    margin: 0;
}