/* CSS Variables - Light Ocean Theme (Vibrant Aquarium) */
:root {
    --primary: #00d2ff;
    /* Bright Cyan */
    --primary-hover: #0099cc;
    --secondary: #3a7bd5;
    /* Clear Blue */
    --bg-color: #bae6fd;
    /* Light Cyan Blue */
    --text-main: #0c4a6e;
    /* Deep Blue text for contrast */
    --text-light: #334155;
    --border-color: rgba(0, 153, 255, 0.2);
    --card-bg: rgba(255, 255, 255, 0.7);
    /* Brighter glass */
    --shadow-sm: 0 4px 20px rgba(0, 100, 255, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 100, 255, 0.15);
    --shadow-xl: 0 20px 50px rgba(0, 100, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Animated Ocean Background --- */
.tech-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #bae6fd 0%, #3a7bd5 100%);
}

.tech-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
    pointer-events: none;
}

/* God Rays */
.god-rays {
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 150%;
    background: repeating-conic-gradient(from 0deg at 50% 0%,
            transparent 0deg,
            rgba(255, 255, 255, 0.15) 15deg,
            transparent 30deg);
    filter: blur(50px);
    animation: sway 15s ease-in-out infinite alternate;
    transform-origin: top center;
}

@keyframes sway {
    from {
        transform: rotate(-5deg);
    }

    to {
        transform: rotate(5deg);
    }
}

/* Fish Swarm */
.fish-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.fish {
    position: absolute;
    pointer-events: none;
    z-index: 0;
    transition: transform 0.5s ease-in-out;
}

@keyframes swim {
    0% {
        transform: translate(-200px, 0) scaleX(1);
    }

    49% {
        transform: translate(calc(100vw + 200px), var(--y-drift)) scaleX(1);
    }

    50% {
        transform: translate(calc(100vw + 200px), var(--y-drift)) scaleX(-1);
    }

    99% {
        transform: translate(-200px, 0) scaleX(-1);
    }
}

#ocean-canvas {
    width: 100%;
    height: 100%;
    display: block;
}


/* Header Refinement for Light Theme */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(0, 153, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 210, 255, 0.3));
}

.logo-area h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.04em;
    text-transform: lowercase;
}

.help-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.help-link:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

/* Main Layout */
.main-content {
    display: flex;
    flex: 1;
    padding: 40px 60px;
    gap: 60px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding-bottom: 100px;
}

.view-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.view-right {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    position: sticky;
    top: 100px;
    height: fit-content;
    perspective: 1500px;
}

/* Steps & Views */
.step-view {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.step-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Hero & Landing Section (Step 1 Enhancement) --- */
.hero-section {
    text-align: center;
    margin-bottom: 50px;
    margin-top: 10px;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-main), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.hero-section p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

.how-it-works {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 80px;
    margin-top: 40px;
}

.work-step {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    text-align: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.work-step:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.step-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0, 210, 255, 0.3);
}

.work-step h4 {
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-main);
}

.work-step p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.4;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-main);
    text-align: center;
    position: relative;
    padding-bottom: 12px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* --- Ad Portal (Soutien Publicitaire) --- */
.portal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 74, 110, 0.4);
    backdrop-filter: blur(15px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.portal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.portal-card {
    background: rgba(255, 255, 255, 0.9);
    width: 500px;
    max-width: 95%;
    padding: 40px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    animation: portalScale 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes portalScale {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close-portal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.ad-badge {
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
}

.ad-container {
    background: #f1f5f9;
    min-height: 250px;
    border-radius: 20px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px dashed var(--border-color);
}

.ad-footer {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#skip-ad-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    color: var(--text-main);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

/* Grid Components */
.grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    perspective: 1000px;
}

@media (min-width: 1100px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    cursor: pointer;
    transition: transform 0.1s ease-out, box-shadow 0.2s ease, border-color 0.2s;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    will-change: transform;
    backdrop-filter: blur(20px);
}

.card:hover {
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(0, 85, 255, 0.15), inset 0 0 20px rgba(0, 85, 255, 0.03);
    z-index: 10;
}

.card::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    transition: opacity 0.2s;
    pointer-events: none;
}

.card:hover::after {
    opacity: 1;
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary);
    flex-shrink: 0;
    transform: translateZ(30px);
    transition: transform 0.1s ease-out, background 0.2s;
}

.card:hover .card-icon {
    background: rgba(0, 229, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

.card-content {
    transform: translateZ(20px);
    transition: transform 0.1s ease-out;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.card-content p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Form Area */
.form-area {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(20px);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.form-group input,
.form-group textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #f9fafb;
    color: var(--text-main);
}

.form-group input:focus,
.form-group textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 85, 255, 0.1);
    background: #ffffff;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.back-btn {
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: var(--text-main);
}

.type-badge {
    font-size: 0.8rem;
    background: #eef2ff;
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Customized settings (Accordions) */
.custom-settings {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.accordion {
    margin-bottom: 16px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    backdrop-filter: blur(20px);
}

.accordion:hover {
    box-shadow: 0 10px 30px rgba(0, 85, 255, 0.08);
    border-color: var(--primary);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    background: rgba(0, 85, 255, 0.02);
    transition: background 0.2s;
}

.accordion-header:hover {
    background: rgba(0, 85, 255, 0.06);
}

.accordion-title-area {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.accordion-icon {
    width: 36px;
    height: 36px;
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.accordion-title-area h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.accordion-title-area p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.chevron {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-light);
}

.accordion.open .chevron {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid transparent;
}

.accordion.open .accordion-content {
    max-height: 800px;
    opacity: 1;
    border-top-color: var(--border-color);
}

.accordion-body {
    padding: 24px;
}

/* Grid Selectors (Frames, Logos) */
.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 12px;
}

.selector-item {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-main);
}

.selector-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.selector-item.selected {
    border-color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 0 0 1px var(--primary);
}

.selector-item img,
.selector-item svg {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* QR Specific Settings Grid */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.setting-row:last-child {
    margin-bottom: 0;
}

.setting-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

input[type="color"] {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    background: transparent;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: 1px solid #ddd;
    border-radius: 8px;
}

.color-hex {
    font-variant-numeric: tabular-nums;
    font-family: monospace;
    font-size: 0.95rem;
    color: var(--text-light);
}

.btn-primary,
.generate {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    box-shadow: 0 10px 20px rgba(0, 85, 255, 0.3);
    letter-spacing: 0.02em;
}

.btn-primary:hover,
.generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 229, 255, 0.4);
}

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

.mt-20 {
    margin-top: 20px;
}

/* ----------------- Hyper-Realistic Phone Mockup ----------------- */
.phone-mockup {
    width: 320px;
    height: 650px;
    background: #000;
    /* Outer bezel color */
    border-radius: 50px;
    position: relative;
    /* Simulate a metallic frame with a series of inset and outset shadow layers */
    box-shadow:
        inset 0 0 0 2px #444,
        /* outer edge highlight */
        inset 0 0 0 6px #111,
        /* main bezel */
        inset 0 0 0 7px #555,
        /* inner edge highlight */
        inset 0 0 20px 10px rgba(0, 0, 0, 0.8),
        /* corner darkness */
        0 40px 80px -20px rgba(0, 0, 0, 0.4),
        /* external shadow */
        0 10px 20px -5px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    will-change: transform;
    z-index: 10;
}

/* Inner Screen Container (The actual glass) */
.phone-inner {
    width: calc(100% - 16px);
    height: calc(100% - 16px);
    background: #fff;
    border-radius: 42px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* inner screen depth */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Glare overlay reacting to tilt */
.phone-glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 100%);
    pointer-events: none;
    /* Let clicks pass through */
    transform: translateZ(50px);
    z-index: 20;
    opacity: 0.5;
    mix-blend-mode: overlay;
    border-radius: 50px;
    transition: transform 0.1s ease-out, opacity 0.3s;
}

/* Hardware Buttons */
.phone-button {
    position: absolute;
    background: #2a2a2a;
    border-radius: 2px;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), inset 0 -1px 1px rgba(0, 0, 0, 0.5);
}

.volume-up {
    width: 3px;
    height: 48px;
    left: -3px;
    top: 160px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.volume-down {
    width: 3px;
    height: 48px;
    left: -3px;
    top: 220px;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.power-button {
    width: 3px;
    height: 64px;
    right: -3px;
    top: 180px;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Dynamic Island */
.dynamic-island {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) translateZ(40px);
    width: 100px;
    height: 30px;
    background: #000;
    border-radius: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.camera-lens {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #111;
    box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.1);
    position: relative;
}

.camera-lens::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 4px;
    height: 4px;
    background: rgba(43, 85, 237, 0.4);
    border-radius: 50%;
    filter: blur(1px);
}

.phone-screen {
    transform: translateZ(20px);
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    text-align: center;
}

.phone-status-bar {
    display: flex;
    justify-content: space-between;
    padding: 16px 28px 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #111;
    z-index: 5;
    transform: translateZ(40px);
}

.status-icons {
    display: flex;
    gap: 4px;
}

.phone-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    text-align: center;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.empty-qr-placeholder {
    width: 160px;
    height: 160px;
    background: #fafafa;
    border: 2px dashed #ddd;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.empty-qr-placeholder svg {
    stroke: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary));
}

.placeholder-logo {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
    letter-spacing: 2px;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
    max-width: 200px;
}

.qr-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.qr-preview-card {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

/* --- QR Scan Laser Animation --- */
.scan-laser {
    position: absolute;
    top: 10%;
    left: 10%;
    width: 80%;
    height: 3px;
    background: var(--primary);
    box-shadow: 0 0 15px 5px rgba(0, 85, 255, 0.4);
    z-index: 50;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.scan-laser.active {
    animation: scanSweep 2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scanSweep {
    0% {
        transform: translateY(0) scaleX(0.8);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: translateY(20px) scaleX(1);
    }

    90% {
        opacity: 1;
        transform: translateY(280px) scaleX(1);
    }

    /* Phone size bounds */
    100% {
        transform: translateY(300px) scaleX(0.8);
        opacity: 0;
    }
}

#qrcode {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

#qrcode img,
#qrcode canvas {
    width: 100% !important;
    height: auto !important;
    display: block;
    z-index: 2;
    position: relative;
}

/* Center Logo on QR */
.logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    opacity: 0.8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.placeholder-logo-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    opacity: 0.8;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.qr-logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 22%;
    height: 22%;
    background: #fff;
    border-radius: 6px;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 5;
    padding: 2px;
}

.qr-logo-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* --- Advanced QR Frames --- */
.qr-preview-card {
    background: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s;
    position: relative;
    border: 2px solid transparent;
}

.frame-text-overlay {
    display: none;
    width: 100%;
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
    margin-top: 15px;
    color: #111;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Classic Mode */
.qr-frame-classic {
    border: 6px solid #111;
    border-radius: 12px;
}

.qr-frame-classic .frame-text-overlay {
    display: block;
}

/* Inverted Mode (Black Bottom Bar) */
.qr-frame-inverted {
    padding-bottom: 0;
    overflow: hidden;
    border: 2px solid #111;
}

.qr-frame-inverted .frame-text-overlay {
    display: block;
    background: #111;
    color: #fff;
    padding: 12px 0;
    margin-top: 15px;
}

/* Bubble Mode */
.qr-frame-bubble {
    border: 4px solid #111;
    border-radius: 30px;
    margin-bottom: 20px;
}

.qr-frame-bubble .frame-text-overlay {
    display: block;
}

.qr-frame-bubble::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 40px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-right: 4px solid #111;
    border-bottom: 4px solid #111;
    transform: rotate(45deg);
}

/* Tech Mode (Neon) */
.qr-frame-tech {
    border: 2px solid var(--primary);
    box-shadow: 0 0 20px rgba(0, 136, 255, 0.2);
}

.qr-frame-tech .frame-text-overlay {
    display: block;
    color: var(--primary);
    font-family: monospace;
}

/* Shopping Bag Mode */
.qr-frame-bag {
    border: 4px solid #111;
    border-top-width: 2px;
    border-radius: 12px;
    margin-top: 20px;
}

.qr-frame-bag .frame-text-overlay {
    display: block;
}

.qr-frame-bag::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    border: 4px solid #111;
    border-bottom: none;
    border-radius: 30px 30px 0 0;
}

/* Cafe Mode */
.qr-frame-cafe {
    border: 4px solid #8b5a2b;
    border-radius: 50% 50% 20px 20px;
    padding-top: 40px;
}

.qr-frame-cafe .frame-text-overlay {
    display: block;
    color: #8b5a2b;
    font-family: serif;
}

.qr-frame-cafe::before {
    content: '♨';
    position: absolute;
    top: 10px;
    font-size: 1.5rem;
    color: #8b5a2b;
}

/* Envelope Mode */
.qr-frame-envelope {
    border: 4px solid #444;
    border-radius: 4px;
}

.qr-frame-envelope .frame-text-overlay {
    display: block;
}

.qr-frame-envelope::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    border-top: 40px solid #f0f0f0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    z-index: -1;
}

/* Modern Mode */
.qr-frame-modern {
    border: 8px solid #000;
    border-radius: 40px;
}

.qr-frame-modern .frame-text-overlay {
    display: block;
    margin-top: 20px;
    font-weight: 900;
}

/* Promo Mode */
.qr-frame-promo {
    border: 4px dashed #dc2626;
    border-radius: 12px;
}

.qr-frame-promo .frame-text-overlay {
    display: block;
    color: #dc2626;
}

/* Restaurant Mode */
.qr-frame-restaurant {
    border: 4px solid #111;
    border-top: 12px solid #111;
    border-radius: 8px;
}

.qr-frame-restaurant .frame-text-overlay {
    display: block;
}

.scan-me-text {
    font-weight: 600;
    color: var(--text-main);
}

.hidden {
    display: none !important;
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Bottom Stepper */
.bottom-stepper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: transparent;
    padding: 20px;
    z-index: 90;
    display: flex;
    justify-content: center;
}

.steps-container {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    padding: 8px 16px;
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f0f0f0;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    cursor: pointer;
}

.step.active {
    color: var(--text-main);
}

.step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s;
}

.step.active .step-num {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
}

.step-separator {
    color: var(--text-light);
    display: flex;
    align-items: center;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
        padding: 20px;
        gap: 40px;
    }

    .view-right {
        width: 100%;
        position: relative;
        top: 0;
        transform: scale(0.85);
        transform-origin: top center;
        margin-bottom: 60px;
        perspective: 800px;
    }

    .grid {
        grid-template-columns: 1fr;
        perspective: 800px;
    }

    .steps-container {
        overflow-x: auto;
        max-width: 100%;
        border-radius: 16px;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Footer --- */
.app-footer {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    padding: 40px 20px;
    margin-top: 100px;
    text-align: center;
    color: var(--text-main);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-content p {
    font-size: 0.95rem;
    opacity: 0.8;
}

.footer-content a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
}

.footer-content a:hover {
    text-decoration: underline;
}