* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #000;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #000;
}

/* Visor */
.viewport {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}

#camera-preview, #filter-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#filter-canvas {
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    pointer-events: none;
}

.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" viewBox="0 0 400 400"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.08"/></svg>');
    pointer-events: none;
    z-index: 3;
    mix-blend-mode: overlay;
}

.flash-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
}

@keyframes flashAnim {
    0% { opacity: 0; }
    15% { opacity: 0.95; }
    100% { opacity: 0; }
}

.flash-overlay.active {
    animation: flashAnim 0.25s ease-out;
}

/* Info del carrete */
.film-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 24px 8px;
    background: linear-gradient(to top, #000 0%, #0a0a0a 100%);
}

.film-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    padding: 6px 14px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.film-icon {
    font-size: 16px;
}

#film-name {
    color: #e6b13e;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: -0.2px;
}

.exposure-info {
    color: #888;
    font-size: 0.9rem;
    font-weight: 500;
    font-feature-settings: "tnum";
}

#shot-counter {
    color: #e6b13e;
    font-size: 1rem;
}

/* Selector de película horizontal */
.film-selector {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    overflow-x: auto;
    scrollbar-width: thin;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(20px);
}

.film-selector::-webkit-scrollbar {
    height: 2px;
}

.film-option {
    background: rgba(30,30,35,0.9);
    border: none;
    border-radius: 40px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ccc;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
}

.film-color {
    width: 12px;
    height: 12px;
    border-radius: 12px;
    display: inline-block;
}

.film-option.active {
    background: #e6b13e;
    color: #000;
}

.film-option.active .film-color {
    border: 1px solid #fff;
}

/* Botón disparador */
.shutter-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px 32px;
    background: linear-gradient(to top, #000 0%, #0a0a0a 80%);
}

.shutter {
    width: 72px;
    height: 72px;
    border-radius: 72px;
    background: #1c1c1e;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.05s linear;
}

.shutter:active {
    transform: scale(0.92);
}

.shutter-inner {
    width: 100%;
    height: 100%;
    border-radius: 100%;
    background: radial-gradient(circle at 30% 30%, #fff, #ddd);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.last-shot-preview {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #1c1c1e;
    overflow: hidden;
    border: 1px solid #333;
}

.last-shot-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Toast de guardado */
.toast {
    position: fixed;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(20px);
    color: #e6b13e;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 100;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-family: monospace;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}