@font-face {
    font-family: 'Brown';
    src: url('fonts/Brown-Bold.eot');
    src: local('Brown-Bold'),
        url('fonts/Brown-Bold.eot?#iefix') format('embedded-opentype'),
        url('fonts/Brown-Bold.woff2') format('woff2'),
        url('fonts/Brown-Bold.woff') format('woff'),
        url('fonts/Brown-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Brown';
    src: url('fonts/Brown-BoldItalic.eot');
    src: local('Brown-BoldItalic'),
        url('fonts/Brown-BoldItalic.eot?#iefix') format('embedded-opentype'),
        url('fonts/Brown-BoldItalic.woff2') format('woff2'),
        url('fonts/Brown-BoldItalic.woff') format('woff'),
        url('fonts/Brown-BoldItalic.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Brown';
    src: url('fonts/Brown-Regular.eot');
    src: local('Brown-Regular'),
        url('fonts/Brown-Regular.eot?#iefix') format('embedded-opentype'),
        url('fonts/Brown-Regular.woff2') format('woff2'),
        url('fonts/Brown-Regular.woff') format('woff'),
        url('fonts/Brown-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Brown';
    src: url('fonts/Brown-RegularItalic.eot');
    src: local('Brown-RegularItalic'),
        url('fonts/Brown-RegularItalic.eot?#iefix') format('embedded-opentype'),
        url('fonts/Brown-RegularItalic.woff2') format('woff2'),
        url('fonts/Brown-RegularItalic.woff') format('woff'),
        url('fonts/Brown-RegularItalic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

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

html {
    touch-action: manipulation;
}

body {
    background-image: url('images/linen.jpg');
    background-position: center;
    background-repeat: repeat;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    background-image: url('images/mm-emboss.svg'), url('images/mm-emboss.png');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        transparent 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.2) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.polaroid {
    position: absolute;
    background: white;
    padding: 15px 15px 60px 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: rotate(var(--rotation));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.polaroid.dragging {
    cursor: grabbing;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.image-container {
    width: 300px;
    height: 300px;
    background-color: #f5f5f5;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}

.polaroid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}

.polaroid img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    z-index: -1;
}

.polaroid img:not(.loaded) {
    opacity: 0;
}

.polaroid img.loaded {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.camera-button {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.camera-button svg {
    width: 32px;
    height: 32px;
}

.camera-button:active {
    transform: translateX(-50%) scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.camera-button.active {
    transform: translateX(-50%) scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.camera-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px #E75339;
}

@keyframes dropIn {
    0% {
        transform: translate(var(--startX), var(--startY)) scale(1.5) rotate(calc(var(--rotation) + var(--startRotation)));
        opacity: 0;
    }
    100% {
        transform: translate(0, 0) scale(1) rotate(var(--rotation));
        opacity: 1;
    }
}

@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.polaroid.new {
    animation: dropIn 1.2s ease forwards;
}

.polaroid.removing {
    animation: fadeOut 0.5s ease forwards;
}

.tooltip {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    color: #E75339;
    padding: 12px 24px;
    border-radius: 16px;
    font-family: 'Brown', sans-serif;
    font-size: 20px;
    font-style: italic;
    font-weight: 600;
    text-align: center;
    letter-spacing: 2px;
    line-height: 120%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.tooltip.visible {
    opacity: 1;
} 