/* RÊVANCE PHOTOBOOTH - ELITE ULTIMATE EDITION 2026 
    NEUBRUTALIST ARCHITECTURE + MICRO-INTERACTION ENGINE
    FIXES: COMPACT EDITOR, MIRRORED CAMERA, & TOP-LAYER TIMER
*/

@import url('https://fonts.googleapis.com/css2?family=Doto:wght@100..900&family=Outfit:wght@100..900&family=Dancing+Script:wght@700&display=swap');

:root {
    --pop-yellow: #FFD93D;
    --pop-pink: #FF8AAE;
    --pop-blue: #6EB9FF;
    --pop-purple: #B983FF;
    --pop-green: #61E7B4;
    --dark-ink: #1A1A1A;
    --white: #FFFFFF;
    --soft-bg: #F0F2F5;
    --border-thick: 6px;
    --shadow-flat: 12px 12px 0px var(--dark-ink);
    --shadow-flat-hover: 18px 18px 0px var(--dark-ink);
    --transit: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- 1. CORE RESET & CENTERING --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--white);
    color: var(--dark-ink);
    font-family: "Outfit", sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    text-align: center; 
}

body::before, body::after {
    content: '';
    position: fixed;
    width: 65vw; /* Only slightly larger */
    height: 65vw;
    border-radius: 50%;
    z-index: -1;
    filter: blur(70px); /* Sharper blur makes the color feel "thicker" */
    opacity: 0.25; /* The "Goldilocks" opacity: not too faint, not too loud */
    animation: floatingOrbs 20s infinite alternate ease-in-out;
}

body::before { 
    background: var(--pop-pink); 
    top: -15%; 
    left: -10%; 
}

body::after { 
    background: var(--pop-blue); 
    bottom: -15%; 
    right: -10%; 
    animation-delay: -5s; 
}
@keyframes floatingOrbs {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 60px) scale(1.1); }
}
.user-menu {
    position: relative;
    display: inline-block;
}

.user-profile-btn {
    border-radius: 5px;
    text-decoration: none;
    color: white;
    background: var(--dark-ink);
    padding: 5px 15px;
    border-radius: 10px;
    margin-left: 15px;

}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    padding: 10px 20px;
    font-family: 'Doto', sans-serif;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--dark-ink);
    background-color: var(--pop-yellow); /* Bright yellow base */
    border: 5px solid var(--dark-ink); /* Thick black border */
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0px 8px 0px var(--dark-ink); /* Hard flat shadow */
    transition: all 0.1s ease-in-out;
}

.user-menu:hover .dropdown-content {
    display: block;
}

.logout-btn {
    background: none;
    border: none;
    padding: 5px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Nunito', sans-serif;
}

.item-details input:focus {
    border-bottom: 1.5px solid var(--pop-blue) !important;
    color: var(--dark-ink) !important;
}
/* --- 3. PRIVACY VAULT POPUP --- */
.popup {
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-content {
    background: var(--white);
    border: var(--border-thick) solid var(--dark-ink);
    border-radius: 40px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
}
.popup-content button {
    margin-top: 25px;
    padding: 15px 30px;
    font-family: 'Doto', sans-serif;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--dark-ink);
    background-color: var(--pop-yellow); /* Bright yellow base */
    border: 5px solid var(--dark-ink); /* Thick black border */
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0px 8px 0px var(--dark-ink); /* Hard flat shadow */
    transition: all 0.1s ease-in-out;
}

.popup-content button:hover {
    background-color: var(--pop-pink); /* Switch to pink on hover */
    transform: translate(0px, 8px); /* Move "up" toward the light */
    box-shadow: 0px 5px 0px var(--dark-ink); /* Shadow gets bigger */
}

.popup-content button:active {
    transform: translate(0px, 8px); /* Smashes down when clicked */
    box-shadow: 0px 0px 0px var(--dark-ink);
}

/* --- 4. NAVIGATION --- */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff6d;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: var(--border-thick) solid var(--dark-ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 1100px;
    z-index: 2000;
    box-shadow: var(--shadow-flat);
}
.navbar img { width: 95px; }

.nav-links a {
    color: var(--dark-ink);
    text-decoration: none;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
    margin-left: 20px;
}

/* --- 5. MAIN WORKSPACE (COMPACT FIT) --- */
.heading {
    margin-top: 150px; 
    font-family: "Doto", sans-serif;
    font-weight: 900;
    font-size: clamp(1.8rem, 6vw, 3.2rem); 
    letter-spacing: -2px;
    line-height: 1;
}

.heading-signin {
    margin-top: 150px; 
    font-family: "Doto", sans-serif;
    font-weight: 900;
    font-size: clamp(1rem, 3vw, 3rem); 
    width: 80%;
    letter-spacing: -2px;
    line-height: 1;
}
.notice {
    font-family: "Dancing Script", cursive;
    font-size: 1.4rem;
    background: var(--dark-ink);
    color: var(--white);
    display: inline-block;
    padding: 5px 20px;
    border-radius: 10px;
    margin: 12px auto; 
    transform: rotate(-1.5deg);
    box-shadow: 4px 4px 0px var(--pop-pink);
}
/* --- NEUBRUTALIST TOAST NOTIFICATION --- */
#toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--pop-green); /* Success color from your variables */
    color: var(--dark-ink);
    padding: 15px 35px;
    border: var(--border-thick) solid var(--dark-ink);
    border-radius: 15px;
    font-family: 'Doto', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 1px;
    z-index: 9999;
    box-shadow: var(--shadow-flat);
    pointer-events: none;
    animation: toastPop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes toastPop {
    0% { transform: translate(-50%, 100px) scale(0.8); opacity: 0; }
    100% { transform: translate(-50%, 0) scale(1); opacity: 1; }
}
/* Ensure the parent of the camera is a flex container */
#main-workspace {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centers horizontally */
    justify-content: center; /* Centers vertically if there is height */
    width: 100%;
}

#camera-container {
    width: 95%;
    max-width: 580px; 
    aspect-ratio: 4/3;
    background: var(--dark-ink);
    border-radius: 30px;
    border: 8px solid var(--dark-ink);
    box-shadow: 15px 15px 0px var(--pop-green);
    position: relative;
    overflow: hidden; /* This clips the unsquashed video edges */
    margin: 20px auto; /* 'auto' handles the horizontal centering */
}

#camera { 
    width: 100%; 
    height: 100%; 
    /* Magic line: fills the 4:3 box by cropping sides instead of squeezing */
    object-fit: cover; 
    transform: scaleX(-1); 
    display: block;
}

/* --- 6. OVERLAY UI (TOP-LAYER TIMER) --- */
#countdown {
    position: absolute;
    inset: 0;
    display: none; 
    align-items: center;
    justify-content: center;
    z-index: 9999 !important; /* FIXED: NOW VISIBLE ON TOP */
    font-family: 'Doto';
    font-size: 60px; 
    font-weight: 900;
    color: var(--white);
    text-shadow: 4px 5px 0px var(--dark-ink);
    pointer-events: none;
}

/* Update this in your style section */
.flash {
    position: fixed;
    inset: 0;
    background: #FFFFFF;
    z-index: 99999; /* Higher than everything else */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.05s ease-in; /* Faster entry */
}
/* Filter Nav Buttons */
.filter-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px; height: 42px;
    background: var(--white);
    border: 3px solid var(--dark-ink);
    border-radius: 50%;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--dark-ink);
    z-index: 100;
}
.filter-nav-btn.prev { left: 15px; }
.filter-nav-btn.next { right: 15px; }

#filter-display-name {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: var(--pop-yellow);
    border: 3px solid var(--dark-ink);
    padding: 6px 20px;
    font-family: 'Doto';
    font-weight: 900;
    font-size: 22px;
    opacity: 0;
    z-index: 101;
    transition: opacity 0.5s;
}
#filter-display-name.active { opacity: 1; }
.upload-action-btn {
    display: none; /* Hidden by default during load */
    margin: 30px auto; 
    width: fit-content;
    background: var(--pop-pink);
    color: var(--white);
    border: 5px solid var(--dark-ink);
    padding: 12px 40px; 
    border-radius: 20px;
    font-family: 'Doto';
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--dark-ink);
    transition: all 0.2s;
    white-space: nowrap;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
}
/* Hover State */
.upload-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 6px 6px 0px var(--dark-ink);
}

.upload-action-btn:active {
    transform: translateY(2px);
    box-shadow: 2px 2px 0px var(--dark-ink);
}
/* --- 7. CAPTURE BUTTON (LOCKED INSIDE CONTAINER) --- */
#capture-btn, #finish-capture-btn {
    /* Fixed position inside the #camera-container */
    position: absolute;
    bottom: 25px; 
    left: 50%;
    transform: translateX(-50%);
    
    /* Layering */
    z-index: 1000; /* High enough to stay above filter buttons and video */
    
    /* Styling */
    margin: 0; /* REMOVE all margins to stop shifting on screen resize */
    background: var(--pop-pink);
    color: var(--white);
    border: 5px solid var(--dark-ink);
    padding: 12px 40px; 
    border-radius: 20px;
    font-family: 'Doto';
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--dark-ink);
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

/* Hover state must maintain the translateX(-50%) centering */
#capture-btn:hover:not(:disabled), #finish-capture-btn:hover:not(:disabled) {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 6px 6px 0px var(--dark-ink);
}


/* Helper class to toggle visibility */
.hidden-ui {
    display: none !important;
}
.filter-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px;
    width: 100%;
    scrollbar-width: none; /* Hide scrollbar Firefox */
}

.filter-scroll-container::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}
 @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}
.filter-item {
    flex: 0 0 auto;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    color: white;
    font-family: 'Doto', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-item.active {
    background: white;
    color: black;
    border-color: white;
}
/* --- 8. STUDIO MODE: MINI-EDITOR --- */
#preview-wrapper {
    display: none;
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    gap: 40px;
}
.studio-mode #preview-wrapper { display: flex; align-items: center;}
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Doto', sans-serif;
}


.loader-content {
    text-align: center;
}
#scratch-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/vintage.png'); /* Ensure path is correct */
    background-size: cover;
    mix-blend-mode: overlay;
    pointer-events: none; /* Allows you to click the 'Next' button through the texture */
    display: none; /* Hidden until filter is selected */
    opacity: 100%;
    z-index: 5;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
#preview {
    position: relative; /* Anchor for the loader */
    transform: rotate(-3deg);
    width: auto;
    min-height: 300px; /* Prevents collapse before image loads */
    background: #eee;  /* Placeholder color */
    display: flex;
    justify-content: center;
    align-items: center;
    border: var(--border-thick) solid var(--dark-ink);
    overflow: hidden;

}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none; /* Controlled by JS */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure this is the highest number */
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #333; /* Darker spinner for light background */
    border-radius: 50%;
    animation: spin 1s linear infinite;
}


    /* The blur effect for the image */
    #photo-strip.is-loading {
        filter: blur(8px);
        transition: filter 0.3s ease;
    }

    /* The background for the loader */
    #loader-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6); /* Semi-transparent background */
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10;
        backdrop-filter: blur(2px); /* Optional extra glass effect */
    }

    #loading-spinner {
        width: 80px; /* Adjust size as needed */
    }

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#photo-strip { width: 300px; height: auto; display: block; }
/* Camera Design */
.camera-wrapper {
    position: relative;
    width: 640px;
    height: 427px; /* Perfect 3:2 ratio */
    margin: 0 auto;
    border: 8px solid #fff;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
}

#camera {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This stops the squishing */
    transform: scaleX(-1); /* Mirror mode */
}
#timer-toggle-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 8px 12px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Doto', sans-serif;
    font-size: 14px;
    transition: 0.2s;
}

#timer-toggle-btn:hover {
    background: white;
    color: black;
}
/* Blinking REC Indicator */
#rec-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    display: none; /* Hidden by default */
    align-items: center;
    color: white;
    font-family: 'Doto', sans-serif;
    font-weight: bold;
    font-size: 18px;
    z-index: 10;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.red-dot {
    width: 12px;
    height: 12px;
    background-color: red;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}
/* Horizontal Thumbs 1 2 3 4 */
.horizontal-layout {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.thumb {
    width: 120px;
    height: 80px;
    background: #222;
    border: 2px solid #444;
    border-radius: 5px;
    overflow: hidden;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



.filter-controls {
    margin: 15px 0;
}
#photo-strip {
    transition: filter 0.3s ease;
}

.preview-blur {
    filter: blur(8px) brightness(0.8);
    pointer-events: none; /* Prevents interaction while blurred */
}
/* REDESIGNED MINI-EDITOR PANEL */
#frame-buttons {
    background: var(--white);
    border: 6px solid var(--dark-ink);
    padding: 25px;
    border-radius: 30px;
    box-shadow: var(--shadow-flat);
    width: 500px; /* FIXED WIDTH */
    text-align: center;
}

.choosetexts {
    font-family: 'Doto';
    font-weight: 900;
    font-size: 11px; /* SMALLER */
    background: var(--pop-yellow);
    display: inline-block;
    padding: 3px 10px;
    margin: 12px 0 8px;
    border: 2px solid var(--dark-ink);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
@keyframes popIn {
    0% { opacity: 0; bottom: 0px; transform: translateX(-50%) scale(0.5); }
    100% { opacity: 1; bottom: 50px; transform: translateX(-50%) scale(1); }
}

.download-btn, .save-btn:hover {
    transform: scale(1.05);
    transition: 0.2s;
}
.frame-btn {
    background: var(--white);
    border: 2px solid var(--dark-ink);
    padding: 8px 4px;
    border-radius: 10px;
    font-weight: 900;
    font-size: 12px; /* MINI TEXT */
    cursor: pointer;
    box-shadow: 3px 3px 0px var(--dark-ink);
    transition: 0.1s;
}
.frame-btn:hover { background: var(--pop-green); transform: translate(-1px, -1px); }

#color-picker {
    width: 100%;
    height: 55px; /* SHORTER */
    border: 3px solid var(--dark-ink);
    border-radius: 10px;
    cursor: pointer;
    background: white;
        padding: 5px;
}
.vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow: 0 0 200px rgba(0,0,0,0.9) inset;
}
/* --- 9. FINAL ACTIONS --- */
#download-container { margin: 30px 0 60px; }

.download-btn, .retake-btn, .save-btn {
    padding: 15px 40px;
    border: 5px solid var(--dark-ink);
    border-radius: 18px;
    font-size: 18px;
    font-weight: 900;
    font-family: 'Doto';
    cursor: pointer;
    box-shadow: 6px 6px 0px var(--dark-ink);
    margin: 8px;
}

/* --- DOWNLOAD MODAL CORE --- */

/* Centers the modal and prevents it from being "stuffed" */
#download-modal.modal-overlay {
    display: none; /* Managed by JS */
    position: fixed;
    inset: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* The Neubrutalist Card */
#download-modal .modal-card {
    background: var(--white);
    border: var(--border-thick) solid var(--dark-ink);
    border-radius: 30px;
    box-shadow: 15px 15px 0px var(--pop-pink);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
}

/* Timer Animation */
#download-timer {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    animation: pulseTimer 1s infinite alternate;
}

@keyframes pulseTimer {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0.7; transform: scale(1.05); }
}

/* Button State Transitions */
#execute-download-btn:disabled {
    background: #e0e0e0 !important;
    color: #a0a0a0 !important;
    border-color: #bcbcbc !important;
    box-shadow: none !important;
    cursor: not-allowed;
    transform: none !important;
}

/* When the JS removes the 'disabled' attribute */
#execute-download-btn:not(:disabled) {
    background: var(--pop-yellow) !important;
    color: var(--dark-ink) !important;
    border-color: var(--dark-ink) !important;
    box-shadow: 6px 6px 0px var(--dark-ink) !important;
    cursor: pointer;
}

#execute-download-btn:not(:disabled):hover {
    transform: translate(-2px, -2px);
    box-shadow: 8px 8px 0px var(--dark-ink) !important;
}

#execute-download-btn:not(:disabled):active {
    transform: translate(2px, 2px);
    background: var(--pop-yellow) !important;
    box-shadow: 0px 0px 0px var(--dark-ink) !important;
}

/* Upsell Box Hover Effect */
#download-modal div[style*="dashed"] {
    transition: var(--transit);
}
/* Add this to your CSS file */
.ready-to-download {
    background: var(--pop-yellow) !important;
    color: var(--dark-ink) !important;
    border-color: var(--dark-ink) !important;
    box-shadow: 6px 6px 0px var(--dark-ink) !important;
    cursor: pointer !important;
}
#download-modal div[style*="dashed"]:hover {
    background: var(--white) !important;
    transform: scale(1.02);
}
.download-btn, .save-btn { background: var(--pop-blue); color: white; }

/* --- 10. SCROLLBAR & SPINNER --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--dark-ink); border-radius: 10px; }

#loading-spinner {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: none; justify-content: center; align-items: center;
    z-index: 1000;
}
.modal-content {
    background: #222;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    max-width: 80%;
}
.modal-content img {
    width: 100%;
    border-radius: 10px;
}
.modal-actions {
    margin-top: 20px;
    display: flex; gap: 20px; justify-content: center;
}
.close-modal {
    position: absolute; top: 20px; right: 30px;
    color: white; font-size: 40px; cursor: pointer;
}
/* Modal Popup Animation */
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.animate-pop {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Modal Background */
.modal-overlay {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #111;
    border: 1px solid #333;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

/* Preview Image */
.retake-preview-img {
    width: 100%;
    max-width: 600px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #444;
}

/* Modal Actions Container */
.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* Retake Buttons Styling */
.modal-actions button {
    padding: 15px 20px;
    font-family: 'Doto', sans-serif;
    font-size: 16px;
    font-weight: 900;
    text-transform: uppercase;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* The Retake Button (Dangerous Action) */
.retake-confirm {
    background: #ff3b3b;
    color: white;
}

.retake-confirm:hover {
    background: #ff0000;
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 59, 59, 0.4);
}

/* The Keep Button (Neutral Action) */
.retake-keep {
    background: white;
    color: black;
}

.retake-keep:hover {
    background: #eee;
    transform: scale(1.05);
}

/* Frame Selection Items */
.frame-grid { display: flex; gap: 10px; overflow-x: auto; padding: 10px; }
.frame-item {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 5px;
    cursor: pointer;
    transition: border 0.3s;
}
.frame-item:hover { border-color: #ff4757; }
/* Flash Effect */
#flash {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.713);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 10000;
    color: white;
    font-family: 'Doto', sans-serif;
}

.spinner {
    width: 50px; height: 50px;
    border: 5px solid rgba(255,255,255,0.1);
    border-top: 5px solid #ff4757;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}
.auth-card { 
            background: var(--white); 
            padding: 40px; 
            border-radius: 30px; 
            border: 6px solid var(--dark-ink); 
            width: 100%; 
            max-width: 450px; 
            min-height: 660px; /* FIXED HEIGHT TO PREVENT JUMPING */
            text-align: center;
            box-shadow: 12px 12px 0px var(--dark-ink);
            transition: var(--transit);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            margin-top: 20%;
        }

        h1 { 
            font-family: 'Doto', sans-serif;
            font-size: 40px;
            color: var(--dark-ink); 
            margin: 0 0 10px 0;
        }

        #auth-title {
            font-weight: 900;
            text-transform: uppercase;
            background: var(--pop-yellow);
            display: inline-block;
            padding: 2px 10px;
            border: 2px solid var(--dark-ink);
            margin-bottom: 20px;
            font-size: 14px;
            transition: var(--transit);
        }

        /* --- NEUBRUTALIST SWITCH --- */
        .auth-switch-container {
            margin-bottom: 25px;
            display: flex;
            justify-content: center;
        }

        .switch-base {
            position: relative;
            display: flex;
            background: var(--white);
            border: 4px solid var(--dark-ink);
            border-radius: 15px;
            padding: 5px;
            width: 260px;
            box-shadow: 6px 6px 0px var(--dark-ink);
        }

        .switch-btn {
            flex: 1;
            background: none;
            border: none;
            font-family: 'Doto', sans-serif;
            font-weight: 900;
            font-size: 12px;
            padding: 10px 0;
            cursor: pointer;
            z-index: 2;
            color: var(--dark-ink);
        }

        .switch-slider {
            position: absolute;
            top: 5px;
            left: 5px;
            height: calc(100% - 10px);
            width: calc(50% - 5px);
            background: var(--pop-yellow);
            border: 3px solid var(--dark-ink);
            border-radius: 10px;
            z-index: 1;
            transition: var(--transit);
        }

        .login-active {
            transform: translateX(100%);
            background: var(--pop-pink);
        }

        /* --- INPUTS & TOGGLE LOGIC --- */
        .input-wrapper {
            flex-grow: 1;
        }

        input { 
            width: 100%; 
            padding: 12px; 
            margin: 8px 0; 
            background: #fff; 
            border: 3px solid var(--dark-ink); 
            color: var(--dark-ink); 
            border-radius: 12px; 
            box-sizing: border-box; 
            font-family: 'Outfit';
            font-weight: 600;
            transition: var(--transit);
            font-size: 18px;
        }

        input:focus {
            outline: none;
            border-color: var(--pop-blue);
            transform: scale(1.02);
        }

        /* The Magic: Smooth Height Handling */
        .signup-only { 
            opacity: 1;
            max-height: 80px; /* Enough for input + margins */
            transform: scaleY(1);
            transition: var(--transit);
            overflow: hidden;
        }

        .signup-only.hidden {
            opacity: 0;
            max-height: 0;
            margin: 0;
            transform: scaleY(0);
            pointer-events: none;
        }

        /* --- BUTTONS & LOADING --- */
        .action-area {
            margin-top: 20px;
        }

        button#submit-btn { 
            width: 100%; 
            padding: 15px; 
            background: var(--pop-blue); 
            border: 4px solid var(--dark-ink); 
            color: var(--dark-ink); 
            font-family: 'Doto';
            font-size: 18px;
            font-weight: 900; 
            border-radius: 15px; 
            cursor: pointer; 
            box-shadow: 6px 6px 0px var(--dark-ink);
            transition: 0.2s;
        }

        button#submit-btn:hover {
            transform: translate(-2px, -2px);
            box-shadow: 8px 8px 0px var(--dark-ink);
            background: var(--pop-green, #61E7B4);
        }

        .loader {
            display: none;
            width: 35px; height: 35px;
            border: 5px solid var(--pop-yellow);
            border-top: 5px solid var(--dark-ink);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 10px auto;
        }







.section-container, .roadmap-section {
    padding: 100px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Doto';
    font-size: clamp(2.5rem, 8vw, 5rem);
    text-align: left;
    margin-bottom: 60px;
    line-height: 0.9;
}

.bg-yellow {
    background: var(--pop-yellow);
    padding: 10px;
    border: 4px solid var(--dark-ink);
    position: absolute;
    margin-bottom: 12px;
}

.bg-pink { background: var(--pop-pink); padding: 10px; border: 4px solid var(--dark-ink);}

/* Hero Enhancements */
.hero-block {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 8px solid var(--dark-ink);
}
.hero-content{
    margin-top: 25vh;
}

.main-title {
    font-family: 'Doto';
    font-size: clamp(3rem, 15vw, 10rem);
    font-weight: 900;
    line-height: 0.8;
}

.hero-description {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 30px auto;
    font-weight: 600;
}
/* --- HERO BACKGROUND ENHANCEMENT --- */
.hero-block {
    background: var(--white);
    /* Animated subtle gradient */
    background: radial-gradient(circle at 50% 50%, rgba(255, 224, 20, 0.15) 0%, rgba(255,255,255,1) 70%);
    overflow: hidden;
}

/* Add a film-grain texture overlay to the whole hero */
.hero-block::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://twelvesites.github.io/images/logo.png');
  
    opacity: 0.05;
    pointer-events: none;
    z-index: 1;
}

/* --- UPDATED ILLUSTRATION BOX --- */
.visual-art-image {
    width: 100%;
    border: 6px solid var(--dark-ink);
    border-radius: 40px;
    box-shadow: 20px 20px 0px var(--dark-ink);
    display: block; /* Removes funny spacing */
    transition: transform 0.3s ease;
}


.status-badge {
    border: 3px solid var(--dark-ink);
    padding: 5px 15px;
    font-family: 'Doto';
    font-weight: 900;
    margin: 5px;
    display: inline-block;
}

/* Feature Boxes */
.feature-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-box {
    border: var(--border-thick) solid var(--dark-ink);
    padding: 40px;
    text-align: left;
    border-radius: 30px;
    box-shadow: 10px 10px 0px var(--dark-ink);
    transition: var(--transit);
}

.feature-box:hover { transform: translate(-5px, -5px); box-shadow: 15px 15px 0px var(--dark-ink); }
.feature-box.pink { background: var(--pop-pink); }
.feature-box.blue { background: var(--pop-blue); }
.feature-box.yellow { background: var(--pop-yellow); }
.feature-box.green { background: var(--pop-green); }

.feature-tag {
    background: var(--dark-ink);
    color: white;
    display: inline-block;
    padding: 2px 10px;
    font-family: 'Doto';
    font-size: 12px;
    margin-bottom: 20px;
}

/* How it Works */
.how-it-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--dark-ink);
    color: white;
    padding: 60px 0;
}

.step-card {
    padding: 40px;
    border-right: 1px solid #444;
}

.step-num {
    font-family: 'Doto';
    font-size: 60px;
    display: block;
    color: var(--pop-yellow);
}

/* Roadmap */
.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.roadmap-item {
    border: 3px solid var(--dark-ink);
    padding: 25px;
    text-align: left;
    border-radius: 15px;
}

.status {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    background: #eee;
    padding: 2px 8px;
    border: 1px solid var(--dark-ink);
}

/* Accent Animation */
.hero-accent {
    position: absolute;
    bottom: 20px;
    white-space: nowrap;
    font-family: 'Doto';
    font-weight: 900;
    font-size: 20px;
    opacity: 0.2;
    animation: marquee 10s linear infinite;
}
/* --- VISUAL DEEP DIVE --- */
.visual-deep-dive {
    background: var(--white);
    padding: 120px 5%;
    border-top: 8px solid var(--dark-ink);
}

.split-content {
    display: flex;
    align-items: center;
    gap: 80px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: left;
}

.heavy-title {
    font-family: 'Doto';
    font-size: 5rem;
    line-height: 0.8;
    margin-bottom: 30px;
}

.highlight-blue {
    background: var(--pop-blue);
    padding: 10px;
    border: 4px solid var(--dark-ink);
    position: absolute;
}

/* QR Illustration */
.visual-art {
    position: relative;
    flex: 1;
}

.qr-illustration-box {
    width: 100%;
    height: 500px;
    background: var(--pop-green);
    border: 6px solid var(--dark-ink);
    border-radius: 40px;
    box-shadow: 20px 20px 0px var(--dark-ink);
    display: flex;
    justify-content: center;
    align-items: center;
}

.phone-mockup {
    width: 200px;
    height: 400px;
    background: var(--dark-ink);
    border-radius: 30px;
    position: relative;
    transform: rotate(-10deg);
}

.qr-code-card {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: white;
    border: 4px solid var(--dark-ink);
    padding: 10px;
    transform: rotate(10deg);
}

/* --- FRAME SHOWCASE --- */
.frame-showcase {
    background: var(--dark-ink);
    padding: 100px 0;
    overflow: hidden;
}

.grid-display {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 40px;
}

.showcase-item {
    background: var(--white);
    border: 4px solid var(--pop-yellow);
    padding: 10px;
    transform: rotate(calc(var(--r, 0) * 1deg));
    transition: 0.3s;
}

.showcase-item:nth-child(odd) { --r: -2; }
.showcase-item:nth-child(even) { --r: 2; }
.showcase-item:hover { transform: rotate(0) scale(1.05); z-index: 10; }

.showcase-item img { width: 100%; height: 400px; object-fit: contain; }
.frame-label { font-family: 'Doto'; font-weight: 900; padding-top: 10px; color: var(--dark-ink); }

/* --- MARQUEE --- */
.marquee-container {
    background: var(--pop-yellow);
    border-top: 6px solid var(--dark-ink);
    border-bottom: 6px solid var(--dark-ink);
    padding: 15px 0;
    font-family: 'Doto';
    font-weight: 900;
    font-size: 24px;
}

.marquee-content {
    display: flex;
    white-space: nowrap;
    animation: marquee-scroll 20s linear infinite;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* --- HEAVY FOOTER --- */
.main-footer {
    background: var(--white);
    border-top: 10px solid var(--dark-ink);
    padding: 80px 5% 40px;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 60px;
    text-align: left;
}

.footer-logo img {
    width: 50%;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.link-col h4 { font-family: 'Doto'; font-size: 18px; margin-bottom: 20px; background: var(--pop-pink); display: inline-block; padding: 0 5px; }
.link-col a { display: block; text-decoration: none; color: var(--dark-ink); font-weight: 700; margin-bottom: 10px; }
.link-col a:hover { text-decoration: underline; }

.subscribe-box {
    display: flex;
    border: 4px solid var(--dark-ink);
    border-radius: 10px;
    overflow: hidden;
}

.subscribe-box input { border: none; padding: 10px; flex: 1; margin: 0; border-radius: 0; }
.subscribe-box button { background: var(--pop-green); border: none; border-left: 4px solid var(--dark-ink); padding: 0 15px; font-family: 'Doto'; font-weight: 900; cursor: pointer; }

.footer-bottom {
    margin-top: 80px;
    padding-top: 20px;
    border-top: 4px solid var(--dark-ink);
    display: flex;
    justify-content: space-between;
    font-family: 'Doto';
    font-size: 12px;
    font-weight: 900;
}
/* --- TRUST BAR --- */
.trust-bar {
    background: var(--dark-ink);
    color: var(--white);
    display: flex;
    justify-content: space-around;
    padding: 20px 0;
    font-family: 'Doto';
    font-weight: 900;
    border-top: 4px solid var(--pop-yellow);
    border-bottom: 4px solid var(--pop-yellow);
}

/* --- SECURITY SECTION --- */
.security-deep-dive {
    padding: 120px 5%;
    background: var(--soft-bg);
}

.split-content.inverted {
    flex-direction: row-reverse;
}

.security-badges {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.s-badge {
    background: var(--dark-ink);
    color: var(--pop-green);
    padding: 5px 15px;
    font-family: 'Doto';
    font-weight: 900;
    border-radius: 5px;
}

/* Vault Illustration */
.cloud-illustration {
    width: 100%;
    height: 450px;
    background: var(--pop-blue);
    border: 6px solid var(--dark-ink);
    border-radius: 40px;
    box-shadow: -20px 20px 0px var(--dark-ink);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.vault-base {
    width: 200px;
    height: 250px;
    background: #e0e0e0;
    border: 6px solid var(--dark-ink);
    border-radius: 10px;
    position: relative;
}

.vault-door {
    width: 160px;
    height: 210px;
    margin: 15px auto;
    background: #bdbdbd;
    border: 4px solid var(--dark-ink);
    display: flex;
    justify-content: center;
    align-items: center;
}

.dial {
    width: 60px;
    height: 60px;
    background: white;
    border: 6px solid var(--dark-ink);
    border-radius: 50%;
}

/* --- COMPARISON TABLE --- */
.comparison-section {
    padding: 100px 5%;
}

.section-title.center { text-align: center; margin-bottom: 80px; }

.comparison-table {
    display: flex;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.comp-col {
    flex: 1;
    background: var(--white);
    border: 6px solid var(--dark-ink);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 10px 10px 0px #eee;
}

.comp-col.highlight {
    background: var(--pop-yellow);
    box-shadow: 15px 15px 0px var(--dark-ink);
    transform: scale(1.05);
}

.comp-col h4 {
    font-family: 'Doto';
    font-size: 24px;
    margin-bottom: 30px;
    text-decoration: underline;
}

.comp-col ul {
    list-style: none;
    text-align: left;
    padding: 0;
}

.comp-col li {
    font-weight: 900;
    padding: 12px 0;
    border-bottom: 2px solid rgba(0,0,0,0.1);
}

/* --- SPEC LIST --- */
.spec-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
}

.spec-list li {
    font-family: 'Doto';
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--dark-ink);
}
/* Server Illustration */
.server-rack {
    width: 150px;
    height: 200px;
    background: #222;
    border: 4px solid var(--dark-ink);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.server-light {
    height: 10px;
    width: 40px;
    background: #444;
    border-radius: 2px;
    position: relative;
}

.server-light::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--pop-green);
    border-radius: 50%;
}

.blink::after { animation: blinking 1s infinite; }
.blink-slow::after { animation: blinking 2s infinite; }

@keyframes blinking {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.connection-line {
    position: absolute;
    width: 100px;
    height: 4px;
    background: var(--dark-ink);
    right: 20%;
    top: 50%;
}


        /* --- SECTION STYLING --- */
        .visual-deep-dive, .security-deep-dive {
            padding: 120px 5%;
            border-top: 8px solid var(--dark-ink);
        }

        .security-deep-dive { background: var(--soft-bg); }

        .split-content {
            display: flex;
            align-items: center;
            gap: 80px;
            max-width: 1400px;
            margin: 0 auto;
        }

        .split-content.inverted { flex-direction: row-reverse; }

        .visual-art { flex: 1; }
        .text-content { flex: 1; text-align: left; }

        .heavy-title {
            font-family: 'Doto';
            font-size: clamp(2.5rem, 5vw, 5rem);
            line-height: 0.8;
            margin-bottom: 30px;
            font-weight: 900;
        }

        .side-label {
            font-family: 'Doto';
            font-weight: 900;
            font-size: 14px;
            letter-spacing: 2px;
            color: rgba(0,0,0,0.5);
            display: block;
            margin-bottom: 10px;
        }

       

        
        .spec-list { list-style: none; padding: 0; margin-top: 30px; }
        .spec-list li { font-family: 'Doto'; font-weight: 900; font-size: 1.2rem; margin-bottom: 15px; }

        .security-badges { display: flex; gap: 15px; margin-top: 25px; flex-wrap: wrap; }
        .s-badge {
            background: var(--dark-ink);
            color: var(--pop-green);
            padding: 8px 15px;
            font-family: 'Doto';
            font-weight: 900;
            border-radius: 5px;
            font-size: 12px;
        }

        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        #status { margin-top: 15px; font-size: 13px; font-weight: 900; color: #ff3b3b; min-height: 20px; }
   
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
/* --- 11. RESPONSIVE --- */
@media (max-width: 950px) {
    #preview-wrapper { flex-direction: column; align-items: center; }
    #frame-buttons { width: 95%; }
}