/* Base styling */
body {
    font-family: 'Roboto', sans-serif;
    overscroll-behavior: none;
}

/* Font styling for Polaroid branding */
.polaroid-font {
    font-family: 'Roboto', sans-serif;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}

.font-geist-mono {
    font-family: monospace;
    letter-spacing: -0.05em;
}

/* Camera styling */
.polaroid-camera-container {
    position: relative;
    z-index: 20;
}

.camera-body {
    width: 300px;
    height: 280px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.camera-body:hover {
    transform: scale(1.02) translateY(-5px);
}

.printer-slot-inner {
    position: relative;
    z-index: 5;
}

/* Button styling */
.btn-primary {
    background-color: #000;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid #000;
}

.btn-primary:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background-color: white;
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid #000;
}

.btn-secondary:hover {
    background-color: #f1f1f1;
    transform: translateY(-2px);
}

.btn-tertiary {
    background-color: #f1f1f1;
    color: #555;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
}

.btn-tertiary:hover {
    background-color: #e5e5e5;
}

/* Wood frame styling */
.wood-frame {
    position: absolute;
    inset: -15px;
    background: linear-gradient(135deg, #8B4513, #654321, #5D4037);
    box-shadow: 
        inset 0 0 20px rgba(0, 0, 0, 0.3),
        0 8px 25px rgba(0, 0, 0, 0.25);
    z-index: 0;
    
    /* Wood grain texture */
    background-image: 
        repeating-linear-gradient(
            70deg,
            rgba(255, 255, 255, 0.05) 0px,
            rgba(255, 255, 255, 0) 2px,
            rgba(255, 255, 255, 0.05) 3px,
            rgba(255, 255, 255, 0) 5px
        ),
        linear-gradient(135deg, #8B4513, #654321, #5D4037);
    
    /* Inner shadow to create depth */
    border: 1px solid #3E2723;
}

/* Corkboard styling */
.corkboard {
    background-color: #F2DFC1; /* Light cork color base */
    box-shadow: inset 0 0 25px rgba(138, 94, 66, 0.3);
    position: relative;
    z-index: 1;
    margin: 15px;
    overflow: hidden;
}

.corkboard-texture {
    background-image: url("cork-texture.svg");
    background-size: 450px 450px;
    opacity: 1;
    pointer-events: none;
}

/* Polaroid photo styling with improved shadow and details */
.polaroid-photo {
    background-color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    padding: 15px 15px 52px 15px; /* Increased padding to make photo larger */
    position: absolute;
    cursor: move;
    user-select: none;
    z-index: 5;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    transform-origin: center;
    border-radius: 2px;
    /* Increased size by 1.5x */
    width: 210px; /* Base size before randomization */
}

.polaroid-photo:hover {
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transform: scale(1.03);
}

.polaroid-photo img {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
}

.polaroid-photo::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.polaroid-photo:active::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
}

/* Photo printing animation from camera */
@keyframes printFromCamera {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 1;
    }
}

.printing-from-camera {
    animation: printFromCamera 1.8s ease-out forwards;
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-100%);
    z-index: 2;
}

/* Animation for flying to corkboard */
@keyframes flyToCorkboard {
    0% {
        transform: translate(var(--fly-start-x), var(--fly-start-y)) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--fly-end-x), var(--fly-end-y)) rotate(var(--fly-rotation)) scale(1);
        opacity: 1;
    }
}

.flying-to-corkboard {
    animation: flyToCorkboard 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    position: fixed;
    z-index: 100;
}

/* Flash effect */
@keyframes flash {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.flash-effect {
    animation: flash 0.3s ease-out;
}

/* Camera flash effect */
#flash {
    box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.8);
}

/* Camera switch button animation */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotate-animation {
    animation: rotate 0.5s ease-in-out;
}

/* Prevent default browser behavior */
html, body {
    touch-action: pan-x pan-y;
    overscroll-behavior: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .camera-body {
        width: 260px;
        height: 240px;
    }
    
    .corkboard {
        min-height: 450px;
    }
}

@media (max-width: 768px) {
    .camera-body {
        width: 240px;
        height: 220px;
    }
    
    .corkboard {
        min-height: 500px;
    }
    
    .polaroid-photo {
        width: 180px;
        padding: 12px 12px 42px 12px;
    }
}
