:root {
    --bg-color: #e0d8c8;
    --paper-color: #f4f1ea;
    --camera-body: #2a2a2a;
    --camera-accent: #333;
    --rainbow-1: #d92b3e;
    --rainbow-2: #e38d28;
    --rainbow-3: #2d8eb3;
    --font-heading: 'Special Elite', monospace;
    --font-hand: 'Caveat', cursive;
}

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

body {
    font-family: var(--font-heading);
    background-color: var(--bg-color);
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    user-select: none;
}

/* Background Texture */
.wall-texture {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

.instruction-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-hand);
    font-size: 2rem;
    color: rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 0;
}

/* Footer Styles */
#site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 10px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 10px;
}

.footer-btn {
    background: var(--camera-body);
    color: var(--paper-color);
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
}

.footer-btn:hover {
    background: var(--camera-accent);
    transform: translateY(-2px);
}

.footer-contact {
    font-size: 0.75rem;
    color: #555;
}

.footer-copy {
    text-align: center;
    font-size: 0.7rem;
    color: #666;
}

.footer-copy .privacy-note {
    color: #2d8eb3;
    margin-top: 5px;
}

.policy-content {
    text-align: left;
    font-size: 0.9rem;
    line-height: 1.6;
}

.policy-content h3 {
    margin-top: 15px;
    margin-bottom: 8px;
    color: var(--camera-body);
}

.policy-content ul {
    margin-left: 20px;
    margin-bottom: 10px;
}

.policy-content li {
    margin-bottom: 5px;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    #site-footer {
        padding: 5px 10px;
    }
}

#photo-wall {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 10;
}

/* Camera Styles */
#camera-container {
    position: fixed;
    bottom: 20px;
    left: 40px;
    z-index: 100;
    width: 320px;
    height: 300px;
    perspective: 1000px;
}

.camera-body {
    width: 100%;
    height: 100%;
    background: var(--camera-body);
    border-radius: 20px 20px 40px 40px;
    position: relative;
    box-shadow: 10px 10px 30px rgba(0, 0, 0, 0.3);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: rotateX(20deg) rotateY(10deg);
    transition: transform 0.3s ease;
}

.camera-body:hover {
    transform: rotateX(0deg) rotateY(0deg) scale(1.02);
}

.viewfinder {
    width: 140px;
    height: 140px;
    background: #000;
    border-radius: 50%;
    border: 8px solid #444;
    overflow: hidden;
    position: relative;
    margin-top: 10px;
    box-shadow: inset 0 0 20px #000;
}

#camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Mirror effect */
}

.flash-unit {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 60px;
    height: 30px;
    background: #555;
    border-radius: 4px;
    border: 2px solid #333;
}

.flash-unit::after {
    content: '';
    display: block;
    width: 40px;
    height: 20px;
    background: #eee;
    margin: 3px auto;
    border-radius: 2px;
    opacity: 0.8;
}

.shutter-btn {
    position: absolute;
    bottom: 40px;
    right: 25px;
    width: 40px;
    height: 40px;
    background: #d92b3e;
    /* Red button */
    border-radius: 50%;
    border: 4px solid #1a1a1a;
    cursor: pointer;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

.shutter-btn:active {
    transform: scale(0.95);
    box-shadow: 1px 1px 0px rgba(0, 0, 0, 0.5);
}

.output-slot {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    height: 10px;
    background: #111;
    border-radius: 4px;
    z-index: 50;
}

.stripe {
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 60px;
    height: 6px;
    z-index: 20;
}

.s-1 {
    background: var(--rainbow-1);
    transform: translateX(-50%) translateY(-12px);
}

.s-2 {
    background: var(--rainbow-2);
    transform: translateX(-50%) translateY(-6px);
}

.s-3 {
    background: var(--rainbow-3);
    transform: translateX(-50%) translateY(0px);
}

.logo {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #888;
    font-size: 14px;
    letter-spacing: 1px;
}

/* UI Overlay */
#ui-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 200;
}

#auth-status {
    background: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    align-items: center;
}

#auth-btn {
    border: none;
    background: var(--camera-body);
    color: white;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
}

/* Photo Styles */
.polaroid {
    position: absolute;
    width: 200px;
    height: 240px;
    background: var(--paper-color);
    padding: 12px 12px 50px 12px;
    box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.2);
    transform: rotate(var(--angle, 0deg));
    transition: box-shadow 0.2s;
    cursor: grab;
    z-index: 20;

    /* Center the initial output */
    display: flex;
    flex-direction: column;
}

.polaroid:active {
    cursor: grabbing;
    box-shadow: 4px 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1000 !important;
    /* Bring to front on drag */
}

.photo-surface {
    position: relative;
    width: 100%;
    height: 180px;
    background: #111;
    overflow: hidden;
}

.photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0) blur(10px) sepia(1);
    /* Starts dark and blurry */
    transition: filter 5s ease-out;
    /* Slow developing effect */
}

.polaroid.developed .photo-img {
    filter: brightness(1) blur(0px) sepia(0.3) contrast(1.1);
    /* Final developed look */
}

.caption-area {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-hand);
    color: #444;
    font-size: 1.2rem;
}

.delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #d92b3e;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 22px;
    cursor: pointer;
    font-family: sans-serif;
    font-weight: bold;
    display: none;
    /* Only show on hover? Or just always hidden for guest */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.polaroid:hover .delete-btn {
    display: block;
}

/* Animation Eject */
@keyframes eject {
    0% {
        top: 0;
        transform: scale(0.9);
        opacity: 0;
    }

    50% {
        top: -180px;
        transform: scale(0.9);
        opacity: 1;
    }

    100% {
        top: -200px;
        transform: scale(1) rotate(var(--random-rot));
        opacity: 1;
    }
}

/* Modal */
.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 500;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--paper-color);
    padding: 40px;
    width: 340px;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    text-align: center;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
}

.input-group {
    margin: 15px 0;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

input {
    width: 100%;
    padding: 8px;
    border: 2px solid #ccc;
    background: #fff;
    font-family: inherit;
}

.retro-btn {
    margin-top: 10px;
    padding: 8px 24px;
    background: #333;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

.switch-mode {
    margin-top: 15px;
    font-size: 0.8rem;
}