* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b6b;
    --secondary: #4ecdc4;
    --dark: #1a1a2e;
    --light: #f7f7f7;
    --vintage-1: #e8b4b8;
    --vintage-2: #d4a5a5;
    --vintage-3: #9d8189;
    --sepia: sepia(0.5) contrast(1.2);
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--light);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

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

/* ===== LANDING PAGE ===== */
#landing-page {
    position: relative;
    background: radial-gradient(circle at center, #2d2d44 0%, #1a1a2e 100%);
    overflow: hidden;
    padding: 20px;
}

.vintage-frame {
    position: relative;
    width: 100%;
    max-width: 700px;
    padding: 50px 40px;
    background: linear-gradient(145deg, #2d2d44, #1a1a2e);
    border: 3px solid var(--vintage-1);
    border-radius: 10px;
    box-shadow:
        0 0 30px rgba(255, 107, 107, 0.3),
        inset 0 0 20px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

.neon-sign {
    margin-bottom: 25px;
    width: 100%;
    overflow: visible;
}

.neon-sign h1 {
    font-size: clamp(2.8rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    color: var(--primary);
    text-shadow:
        0 0 10px var(--primary),
        0 0 20px var(--primary),
        0 0 30px var(--primary),
        0 0 40px var(--primary);
    animation: flicker 3s infinite alternate;
    margin: 0;
    padding: 0 10px;
    line-height: 1.3;
    text-align: center;
    word-spacing: 0.1em;
    white-space: nowrap;
    overflow: visible;
    display: inline-block;
    width: 100%;
}

@keyframes flicker {

    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
        text-shadow:
            0 0 10px var(--primary),
            0 0 20px var(--primary),
            0 0 30px var(--primary),
            0 0 40px var(--primary);
    }

    20%,
    24%,
    55% {
        text-shadow: none;
    }
}

.glitch {
    position: relative;
    display: inline-block;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.glitch::before {
    animation: glitch-1 2.5s infinite;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
    transform: translate(-2px, -2px);
}

.glitch::after {
    animation: glitch-2 2.5s infinite;
    clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
    transform: translate(2px, 2px);
}

@keyframes glitch-1 {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-2 {

    0%,
    100% {
        transform: translate(0);
    }

    20% {
        transform: translate(2px, -2px);
    }

    40% {
        transform: translate(2px, 2px);
    }

    60% {
        transform: translate(-2px, -2px);
    }

    80% {
        transform: translate(-2px, 2px);
    }
}

.subtitle {
    margin-bottom: 35px;
}

.subtitle p {
    font-size: 1.1rem;
    color: var(--secondary);
    margin: 0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.enter-btn {
    position: relative;
    padding: 20px 60px;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.2em;
    background: linear-gradient(145deg, var(--primary), #ff5252);
    color: white;
    border: 3px solid var(--light);
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow:
        0 5px 15px rgba(255, 107, 107, 0.4),
        inset 0 -5px 15px rgba(0, 0, 0, 0.3);
}

.enter-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow:
        0 8px 25px rgba(255, 107, 107, 0.6),
        inset 0 -5px 15px rgba(0, 0, 0, 0.3);
}

.enter-btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-flash {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: flash 3s infinite;
}

@keyframes flash {

    0%,
    100% {
        left: -100%;
    }

    50% {
        left: 100%;
    }
}

.vintage-stripes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.03) 2px,
            rgba(255, 255, 255, 0.03) 4px);
    pointer-events: none;
}

.film-grain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence baseFrequency="0.9" /></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.05"/></svg>');
    pointer-events: none;
    opacity: 0.5;
}

/* ===== 🎰 SLOT MACHINE HANDLE ===== */
.slot-handle {
    position: absolute;
    right: -60px;
    top: 15%;
    z-index: 10;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.handle-mount {
    width: 40px;
    height: 60px;
    background: linear-gradient(145deg, #2d2d44, #1a1a2e);
    border: 3px solid var(--vintage-1);
    border-radius: 8px;
    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.5),
        inset 0 2px 5px rgba(255, 255, 255, 0.1);
    position: relative;
}

.handle-mount::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15px;
    height: 15px;
    background: radial-gradient(circle, #888, #444);
    border-radius: 50%;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
}

.handle-arm {
    position: absolute;
    top: 30px;
    left: 16px;
    width: 8px;
    height: 120px;
    background: linear-gradient(to right, #c0c0c0, #888);
    border-radius: 4px;
    box-shadow:
        2px 0 5px rgba(0, 0, 0, 0.5),
        inset -2px 0 3px rgba(0, 0, 0, 0.5);
    transform-origin: top center;
    transition: height 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.handle-grip {
    position: absolute;
    top: 140px;
    left: 8px;
    width: 30px;
    height: 50px;
    background: linear-gradient(145deg, var(--primary), #ff5252);
    border-radius: 15px;
    box-shadow:
        0 5px 15px rgba(255, 107, 107, 0.6),
        inset 0 -3px 8px rgba(0, 0, 0, 0.4);
    transform-origin: top center;
    transition: top 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.handle-grip:hover {
    background: linear-gradient(145deg, #ff5252, var(--primary));
    box-shadow:
        0 8px 20px rgba(255, 107, 107, 0.8),
        inset 0 -3px 8px rgba(0, 0, 0, 0.4);
}

.grip-ball {
    width: 25px;
    height: 25px;
    background: radial-gradient(circle at 30% 30%, #ff8888, var(--primary));
    border-radius: 50%;
    box-shadow:
        0 3px 10px rgba(255, 107, 107, 0.8),
        inset -2px -2px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: -12px;
}

.slot-handle.pulled .handle-arm {
    height: 220px;
}

.slot-handle.pulled .handle-grip {
    top: 240px;
}

.slot-handle.return .handle-arm {
    animation: armReturn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.slot-handle.return .handle-grip {
    animation: gripReturn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes armReturn {
    0% {
        height: 220px;
    }

    50% {
        height: 110px;
    }

    70% {
        height: 125px;
    }

    100% {
        height: 120px;
    }
}

@keyframes gripReturn {
    0% {
        top: 240px;
    }

    50% {
        top: 130px;
    }

    70% {
        top: 145px;
    }

    100% {
        top: 140px;
    }
}

.handle-grip:not(.pulled):hover {
    animation: handleBounce 0.6s ease-in-out infinite;
}

@keyframes handleBounce {

    0%,
    100% {
        top: 140px;
    }

    50% {
        top: 148px;
    }
}

.slot-handle.pulled .handle-grip,
.slot-handle.return .handle-grip {
    animation: none;
}

.handle-grip::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 15%;
    width: 50%;
    height: 30%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent);
    border-radius: 50%;
    opacity: 0.6;
}

/* ===== FRAME SELECTION ===== */
#frame-selection {
    padding: 40px 20px;
}

.header {
    width: 100%;
    max-width: 1200px;
    text-align: center;
    margin-bottom: 40px;
}

.header h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.mode-toggle {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    background: transparent;
    color: var(--light);
    border: 2px solid var(--secondary);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mode-btn:hover {
    background: rgba(78, 205, 196, 0.2);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: var(--secondary);
    color: var(--dark);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.6);
}

.frames-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    width: 100%;
    margin-bottom: 40px;
}

.frame-option {
    cursor: pointer;
    transition: transform 0.3s ease;
    text-align: center;
}

.frame-option:hover {
    transform: translateY(-10px);
}

.frame-option.selected .frame-preview {
    box-shadow: 0 0 30px rgba(255, 107, 107, 0.8);
    border-color: var(--primary);
}

.frame-preview {
    background: linear-gradient(145deg, #2d2d44, #1a1a2e);
    border: 3px solid var(--vintage-1);
    border-radius: 10px;
    padding: 20px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.preview-border {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--light);
    position: relative;
}

.classic-border {
    border: 8px solid #fff;
    box-shadow:
        inset 0 0 0 2px #000,
        0 0 20px rgba(0, 0, 0, 0.5);
}

.polaroid-border {
    border: 15px solid #fff;
    border-bottom-width: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.photostrip-border {
    width: 100%;
    height: 100%;
    background: #fff;
    border: 3px solid #000;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.strip-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    height: 100%;
}

.strip-slot {
    flex: 1;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border: 2px dashed #999;
    border-radius: 3px;
}

.filmstrip-border {
    border: 10px solid #222;
    background:
        repeating-linear-gradient(90deg, #333 0px, #333 5px, transparent 5px, transparent 10px),
        repeating-linear-gradient(0deg, #333 0px, #333 5px, transparent 5px, transparent 10px);
}

.ornate-border {
    border: 12px solid;
    border-image: linear-gradient(45deg, var(--vintage-1), var(--vintage-2)) 1;
    box-shadow:
        inset 0 0 20px rgba(212, 165, 165, 0.4),
        0 0 20px rgba(212, 165, 165, 0.4);
}

.simple-border {
    border: 4px solid var(--light);
    border-radius: 5px;
}

.double-border {
    border: 6px double var(--vintage-1);
    box-shadow:
        inset 0 0 0 2px var(--dark),
        0 0 15px rgba(232, 180, 184, 0.5);
}

.frame-option p {
    font-size: 1.1rem;
    color: var(--secondary);
    font-weight: bold;
}

.next-btn,
.back-btn {
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(145deg, var(--primary), #ff5252);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.next-btn:hover,
.back-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.back-btn {
    background: linear-gradient(145deg, var(--secondary), #3db8af);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
    margin-right: auto;
}

.back-btn:hover {
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.6);
}

/* ===== PHOTO CAPTURE ===== */
#photo-capture .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 900px;
}

.photo-strip-counter {
    width: 100%;
    max-width: 900px;
    margin-bottom: 20px;
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid var(--secondary);
    border-radius: 15px;
    padding: 20px;
}

.counter-info {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary);
    margin-bottom: 15px;
}

.current-count {
    font-size: 2rem;
    color: var(--primary);
}

.strip-thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.strip-thumb {
    aspect-ratio: 1;
    background: #1a1a2e;
    border: 3px solid var(--vintage-1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.strip-thumb.filled {
    border-color: var(--secondary);
}

.strip-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.strip-thumb .thumb-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--vintage-1);
    font-weight: bold;
}

.strip-thumb.filled .thumb-number {
    display: none;
}

.capture-container {
    width: 100%;
    max-width: 900px;
}

.camera-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 30px;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    aspect-ratio: 4/3;
}

#camera,
#preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px dashed rgba(255, 255, 255, 0.3);
    pointer-events: none;
    margin: 20px;
    width: calc(100% - 40px);
    height: calc(100% - 40px);
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.upload-btn,
.switch-btn {
    padding: 15px 25px;
    background: rgba(78, 205, 196, 0.2);
    border: 2px solid var(--secondary);
    border-radius: 15px;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: bold;
}

.upload-btn:hover,
.switch-btn:hover {
    background: var(--secondary);
    color: var(--dark);
    transform: translateY(-2px);
}

.capture-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.capture-ring {
    width: 80px;
    height: 80px;
    border: 4px solid var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.capture-btn:hover .capture-ring {
    border-color: var(--primary);
    transform: scale(1.1);
}

.capture-circle {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.capture-btn:active .capture-circle {
    transform: scale(0.9);
}

.action-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.retake-btn,
.process-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.retake-btn {
    background: rgba(255, 107, 107, 0.2);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.retake-btn:hover {
    background: var(--primary);
    color: white;
}

.process-btn {
    background: linear-gradient(145deg, var(--secondary), #3db8af);
    color: white;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.process-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.6);
}

/* ===== PROCESSING SCREEN ===== */
.processing-container {
    text-align: center;
}

.vintage-camera {
    margin-bottom: 40px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.camera-body {
    width: 150px;
    height: 120px;
    background: linear-gradient(145deg, #2d2d44, #1a1a2e);
    border-radius: 20px;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lens {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #4ecdc4, #2d2d44);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow:
        inset 0 0 20px rgba(78, 205, 196, 0.5),
        0 0 30px rgba(78, 205, 196, 0.3);
    animation: focus 1.5s infinite;
}

@keyframes focus {

    0%,
    100% {
        box-shadow: inset 0 0 20px rgba(78, 205, 196, 0.5), 0 0 30px rgba(78, 205, 196, 0.3);
    }

    50% {
        box-shadow: inset 0 0 30px rgba(78, 205, 196, 0.8), 0 0 50px rgba(78, 205, 196, 0.6);
    }
}

.flash {
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 5px;
    position: absolute;
    top: 15px;
    right: 15px;
    animation: flashBlink 1s infinite;
}

@keyframes flashBlink {

    0%,
    50%,
    100% {
        opacity: 1;
        box-shadow: 0 0 10px var(--primary);
    }

    25%,
    75% {
        opacity: 0.3;
        box-shadow: none;
    }
}

.processing-container h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 30px;
}

.loading-bar {
    width: 300px;
    height: 8px;
    background: rgba(78, 205, 196, 0.2);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 10px;
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        width: 0%;
    }

    100% {
        width: 100%;
    }
}

/* ===== RESULT SCREEN ===== */
#result .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-btn {
    padding: 12px 25px;
    background: rgba(78, 205, 196, 0.2);
    border: 2px solid var(--secondary);
    border-radius: 25px;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: bold;
}

.gallery-btn:hover {
    background: var(--secondary);
    color: var(--dark);
    transform: translateY(-2px);
}

.result-container {
    width: 100%;
    max-width: 800px;
}

.photo-result {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-result canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

.result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.download-btn {
    background: linear-gradient(145deg, var(--primary), #ff5252);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.download-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

.share-btn {
    background: linear-gradient(145deg, var(--secondary), #3db8af);
    color: white;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.6);
}

.new-btn {
    background: rgba(247, 247, 247, 0.1);
    color: var(--light);
    border: 2px solid var(--light);
}

.new-btn:hover {
    background: var(--light);
    color: var(--dark);
    transform: translateY(-3px);
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #2d2d44, #1a1a2e);
    border-radius: 15px;
    padding: 30px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--vintage-1);
}

.modal-header h2 {
    font-size: 2rem;
    color: var(--primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    width: 40px;
    height: 40px;
}

.close-modal:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-actions {
    opacity: 1;
}

.gallery-item-btn {
    padding: 8px 15px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.gallery-item-btn:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

.empty-gallery {
    text-align: center;
    padding: 60px 20px;
    color: var(--vintage-1);
    font-size: 1.2rem;
}

.share-content {
    max-width: 500px;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.share-option {
    padding: 20px;
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid var(--secondary);
    border-radius: 15px;
    color: var(--secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: bold;
}

.share-option svg {
    width: 40px;
    height: 40px;
}

.share-option:hover {
    background: var(--secondary);
    color: var(--dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(78, 205, 196, 0.4);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
    .vintage-frame {
        max-width: 650px;
        padding: 45px 35px;
    }

    .neon-sign h1 {
        font-size: clamp(2.5rem, 7vw, 4.5rem);
        letter-spacing: 0.1em;
    }

    .slot-handle {
        right: -50px;
        top: 18%;
    }
}

@media (max-width: 768px) {
    #landing-page {
        padding: 15px;
    }

    .vintage-frame {
        max-width: 550px;
        padding: 40px 30px;
    }

    .neon-sign h1 {
        font-size: clamp(2.2rem, 6.5vw, 4rem);
        letter-spacing: 0.08em;
    }

    .subtitle p {
        font-size: 0.95rem;
        letter-spacing: 0.12em;
    }

    .enter-btn {
        padding: 18px 50px;
        font-size: 1.3rem;
    }

    .slot-handle {
        right: -45px;
        top: 20%;
        transform: scale(0.85);
    }

    .slot-handle.pulled .handle-arm {
        height: 200px;
    }

    .slot-handle.pulled .handle-grip {
        top: 220px;
    }

    .frames-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }

    .frame-preview {
        height: 150px;
    }

    .preview-border {
        width: 100px;
        height: 100px;
        font-size: 0.75rem;
    }

    .controls {
        flex-direction: column;
        gap: 15px;
    }

    .result-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
        justify-content: center;
    }

    .share-options {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 600px) {
    .vintage-frame {
        max-width: 480px;
        padding: 35px 25px;
    }

    .neon-sign h1 {
        font-size: clamp(1.8rem, 6vw, 3.5rem);
        letter-spacing: 0.06em;
        white-space: normal;
        word-break: keep-all;
    }
}

@media (max-width: 480px) {
    .vintage-frame {
        padding: 30px 20px;
    }

    .neon-sign h1 {
        font-size: clamp(1.5rem, 5.5vw, 3rem);
        letter-spacing: 0.05em;
    }

    .subtitle p {
        font-size: 0.85rem;
        letter-spacing: 0.1em;
    }

    .enter-btn {
        padding: 15px 40px;
        font-size: 1.1rem;
    }

    .slot-handle {
        right: -35px;
        top: 15%;
        transform: scale(0.7);
    }

    .slot-handle.pulled .handle-arm {
        height: 180px;
    }

    .slot-handle.pulled .handle-grip {
        top: 200px;
    }

    .header h2 {
        font-size: 1.8rem;
    }

    .modal-content {
        padding: 20px;
    }
}

@media (max-width: 380px) {
    .vintage-frame {
        padding: 25px 15px;
    }

    .neon-sign h1 {
        font-size: 1.4rem;
        letter-spacing: 0.04em;
    }

    .slot-handle {
        display: none;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--secondary), var(--primary));
}

/* Add these styles at the END of your existing CSS */

/* ===== BRANDING & LOGO ===== */
.logo-container {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 5;
}

.brand-logo {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
    letter-spacing: 0.05em;
}

.brand-tagline {
    font-size: 0.9rem;
    color: var(--secondary);
    margin: 5px 0 0 0;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.brand-logo-small {
    font-size: 1.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* ===== TOP BAR ===== */
.top-bar {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.home-btn {
    padding: 10px 20px;
    background: rgba(78, 205, 196, 0.2);
    border: 2px solid var(--secondary);
    border-radius: 20px;
    color: var(--secondary);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.home-btn:hover {
    background: var(--secondary);
    color: var(--dark);
}

/* ===== COMPACT STYLES (No Scroll) ===== */
.compact-header {
    text-align: center;
    margin: 80px 0 20px 0;
}

.compact-header h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.frames-container-compact {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    max-width: 900px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

.frame-preview-compact {
    background: linear-gradient(145deg, #2d2d44, #1a1a2e);
    border: 3px solid var(--vintage-1);
    border-radius: 8px;
    padding: 15px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.frame-option p {
    font-size: 0.85rem;
    margin-top: 8px;
}

.next-btn-compact {
    padding: 12px 40px;
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(145deg, var(--primary), #ff5252);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px auto;
    display: block;
}

.back-btn-compact {
    padding: 10px 20px;
    background: rgba(78, 205, 196, 0.2);
    border: 2px solid var(--secondary);
    border-radius: 20px;
    color: var(--secondary);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.capture-container-compact {
    width: 100%;
    max-width: 700px;
    margin: 80px auto 0;
}

.camera-wrapper-compact {
    width: 100%;
    height: 400px;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
}

.controls-compact {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.control-btn {
    padding: 10px 20px;
    background: rgba(78, 205, 196, 0.2);
    border: 2px solid var(--secondary);
    border-radius: 15px;
    color: var(--secondary);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.capture-btn-compact {
    width: 70px;
    height: 70px;
    background: transparent;
    border: 4px solid var(--light);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.capture-circle-compact {
    width: 55px;
    height: 55px;
    background: var(--primary);
    border-radius: 50%;
}

.action-buttons-compact {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.retake-btn-compact,
.process-btn-compact {
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retake-btn-compact {
    background: rgba(255, 107, 107, 0.2);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.process-btn-compact {
    background: var(--secondary);
    color: var(--dark);
    border: none;
}

.result-container-compact {
    width: 100%;
    max-width: 600px;
    margin: 80px auto 0;
}

.photo-result-compact {
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
    max-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-result-compact canvas {
    max-width: 100%;
    max-height: 500px;
    height: auto;
}

.result-actions-compact {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn-compact {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-btn-compact {
    padding: 10px 20px;
    background: rgba(78, 205, 196, 0.2);
    border: 2px solid var(--secondary);
    border-radius: 20px;
    color: var(--secondary);
    cursor: pointer;
    font-weight: bold;
}

/* ===== FOOTER ===== */
.main-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
    max-width: 800px;
    z-index: 5;
}

.footer-content {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.footer-link {
    background: none;
    border: none;
    color: var(--secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-decoration: underline;
}

.footer-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.footer-divider {
    color: var(--vintage-1);
}

.footer-credit {
    color: var(--light);
    font-size: 0.9rem;
    margin: 0;
}

.footer-credit .highlight {
    color: var(--primary);
    font-weight: bold;
}

/* ===== INFO MODALS ===== */
.info-modal-content {
    max-width: 700px;
    max-height: 85vh;
}

.modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-body h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.modal-body h4 {
    color: var(--secondary);
    margin: 20px 0 10px 0;
    font-size: 1.2rem;
}

.modal-body p {
    color: var(--light);
    line-height: 1.8;
    margin-bottom: 15px;
}

.modal-body ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}

.modal-body ul li {
    padding: 8px 0;
    color: var(--light);
    line-height: 1.6;
}

.modal-body hr {
    border: none;
    border-top: 1px solid var(--vintage-1);
    margin: 25px 0;
}

.privacy-footer,
.faq-footer {
    text-align: center;
    font-style: italic;
    color: var(--secondary);
    margin-top: 20px;
}

/* FAQ Specific */
.faq-item {
    background: rgba(78, 205, 196, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary);
}

.faq-item h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.faq-footer a {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

/* Contact Specific */
.contact-body {
    padding: 0;
}

.contact-intro {
    text-align: center;
    margin-bottom: 25px;
    padding: 0 20px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
    padding: 0 20px;
}

.contact-card {
    background: rgba(78, 205, 196, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid var(--secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-card:hover {
    background: var(--secondary);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(78, 205, 196, 0.4);
}

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

.contact-details h4 {
    margin: 0 0 5px 0;
    color: var(--light);
    font-size: 1rem;
}

.contact-details p {
    margin: 0;
    color: var(--secondary);
    font-size: 0.9rem;
}

.contact-card:hover .contact-details h4,
.contact-card:hover .contact-details p {
    color: var(--dark);
}

.contact-footer-section {
    background: rgba(255, 107, 107, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin: 20px;
    border-left: 4px solid var(--primary);
}

.contact-footer-section h4 {
    color: var(--primary);
    margin-top: 0;
}

/* ===== RESPONSIVE UPDATES ===== */
@media (max-width: 968px) {
    .frames-container-compact {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .brand-logo {
        font-size: 2.2rem;
    }

    .logo-container {
        top: 20px;
    }

    .frames-container-compact {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .frame-preview-compact {
        height: 80px;
        padding: 10px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .compact-header h2 {
        font-size: 1.5rem;
    }

    .camera-wrapper-compact {
        height: 300px;
    }

    .photo-result-compact {
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .brand-logo {
        font-size: 1.8rem;
    }

    .frames-container-compact {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== WATERMARK ON PHOTOS ===== */
.photo-watermark {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 1.2rem;
    color: var(--secondary);
    font-weight: bold;
    opacity: 0.8;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 🆕 NEW FRAME STYLES */

/* Retro Frame - Rounded with gradient */
.retro-border {
    border: 10px solid;
    border-image: linear-gradient(135deg, #ff6b6b, #4ecdc4, #ff6b6b) 1;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(78, 205, 196, 0.1));
    box-shadow:
        0 0 20px rgba(255, 107, 107, 0.5),
        inset 0 0 20px rgba(78, 205, 196, 0.3);
}

/* Neon Frame - Glowing effect */
.neon-border {
    border: 6px solid #4ecdc4;
    border-radius: 15px;
    box-shadow:
        0 0 10px #4ecdc4,
        0 0 20px #4ecdc4,
        0 0 30px #4ecdc4,
        inset 0 0 10px #4ecdc4,
        inset 0 0 20px rgba(78, 205, 196, 0.5);
    background: rgba(78, 205, 196, 0.05);
    animation: neonPulse 2s ease-in-out infinite;
}

@keyframes neonPulse {

    0%,
    100% {
        box-shadow:
            0 0 10px #4ecdc4,
            0 0 20px #4ecdc4,
            0 0 30px #4ecdc4,
            inset 0 0 10px #4ecdc4;
    }

    50% {
        box-shadow:
            0 0 20px #4ecdc4,
            0 0 30px #4ecdc4,
            0 0 40px #4ecdc4,
            inset 0 0 20px #4ecdc4;
    }
}

/* Stamp Frame - Postage stamp style */
.stamp-border {
    border: 8px solid #e8b4b8;
    background:
        linear-gradient(90deg, #e8b4b8 50%, transparent 50%),
        linear-gradient(90deg, #e8b4b8 50%, transparent 50%),
        linear-gradient(0deg, #e8b4b8 50%, transparent 50%),
        linear-gradient(0deg, #e8b4b8 50%, transparent 50%);
    background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
    background-size: 15px 8px, 15px 8px, 8px 15px, 8px 15px;
    background-position: 0 0, 0 100%, 0 0, 100% 0;
    box-shadow:
        inset 0 0 0 3px #fff,
        0 5px 15px rgba(232, 180, 184, 0.5);
}

/* 🔥 FIX 2: Preview Container Proper Display */
.preview-container {
    width: 100%;
    height: 100%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #000;
    overflow: hidden;
}

#preview-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Ensure camera wrapper maintains aspect ratio */
.camera-wrapper-compact {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#camera {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix for photo result canvas */
.photo-result-compact canvas {
    max-width: 100%;
    max-height: 500px;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}