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

body {
    font-family: 'Space Grotesk', -apple-system, sans-serif;
    background: #0d0d0d;
    min-height: 100vh;
    padding: 40px 20px;
    color: #fff;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    background: #141414;
    border-radius: 20px;
    padding: 50px;
    border: 1px solid #222;
}

h1 {
    text-align: center;
    font-weight: 600;
    font-size: 1.9em;
    letter-spacing: -1.5px;
    margin-bottom: 36px;
}

.tabs {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 44px;
}

.tab-btn {
    padding: 10px 32px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.tab-btn:hover { color: #fff; border-color: #444; }
.tab-btn.active { background: #fff; color: #000; border-color: #fff; }

.tab-content { display: none; }
.tab-content.active { display: block; }

.shoot-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 36px;
    align-items: start;
}

.camera-section {
    position: relative;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #222;
    aspect-ratio: 4/3;
    width: 100%;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.25s, transform 0.25s;
}

.sticker-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.sticker-item {
    position: absolute;
    cursor: move;
    pointer-events: all;
    user-select: none;
}

.sticker-item img {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
}

.sticker-remove {
    position: absolute;
    top: -8px; right: -8px;
    width: 18px; height: 18px;
    background: #fff;
    color: #000;
    border-radius: 50%;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: all;
    font-weight: 700;
}

.countdown-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 110px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 4px 30px rgba(0,0,0,0.9);
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}

.shot-counter {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.2s;
}
.shot-counter.visible { opacity: 1; }

/* ── CONTROLS ── */
.camera-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    background: transparent;
    color: #555;
    font-family: 'Space Grotesk', sans-serif;
}
.btn:hover:not(:disabled) { color: #fff; border-color: #555; }
.btn:disabled { opacity: 0.22; cursor: not-allowed; }

.btn-primary { background: #fff; color: #000; border-color: #fff; }
.btn-primary:hover:not(:disabled) { background: #e0e0e0; border-color: #e0e0e0; color: #000; }

.btn-shoot { background: #fff; color: #000; border-color: #fff; font-weight: 600; flex: 1; }
.btn-shoot:hover:not(:disabled) { background: #e0e0e0; border-color: #e0e0e0; }

/* ── OPTIONS COL ── */
.options-col {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.section-label {
    font-size: 10px;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 20px 0 8px;
}
.section-label:first-child { margin-top: 0; }

/* ── SHOT COUNT + MIRROR ── */
.option-row {
    display: flex;
    gap: 6px;
}

.opt-btn {
    flex: 1;
    padding: 8px 0;
    border: 1px solid #2a2a2a;
    border-radius: 7px;
    background: transparent;
    color: #555;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.opt-btn:hover { color: #fff; border-color: #555; }
.opt-btn.active { background: #fff; color: #000; border-color: #fff; }

/* ── FILTER PREVIEWS ── */
.filter-previews {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.filter-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.2s;
}
.filter-preview-item:hover { opacity: 0.75; }
.filter-preview-item.active { opacity: 1; }

.filter-canvas {
    width: 100%;
    height: auto;
    border-radius: 5px;
    border: 1px solid #2a2a2a;
    display: block;
    aspect-ratio: 4/3;
}
.filter-preview-item.active .filter-canvas { border-color: #fff; }

.filter-preview-item span {
    font-size: 10px;
    color: #555;
}
.filter-preview-item.active span { color: #fff; }

/* ── FRAMES ── */
.frame-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.frame-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 0.2s;
}
.frame-thumb:hover { opacity: 0.7; }
.frame-thumb.active { opacity: 1; }

.frame-preview {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: #1e1e1e;
}
.frame-preview.plain { border: 1px solid #333; }
.frame-preview.white-frame { border: 5px solid #fff; }
.frame-preview.black-frame { border: 5px solid #000; background: #2a2a2a; }
.frame-preview.pink-frame { border: 5px solid #ffd6e0; }
.frame-preview.deco-frame { border: 4px solid #c9a96e; background: repeating-linear-gradient(45deg,#1a1a1a,#1a1a1a 4px,#222 4px,#222 8px); }

.frame-thumb span { font-size: 10px; color: #555; }
.frame-thumb.active span { color: #fff; }

/* ── STICKERS ── */
.sticker-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    min-height: 8px;
}

.sticker-thumb {
    width: 42px; height: 42px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    cursor: pointer;
    background: #1a1a1a;
    padding: 5px;
    transition: border-color 0.2s;
}
.sticker-thumb:hover { border-color: #fff; }
.sticker-thumb img { width: 100%; height: 100%; object-fit: contain; }

.btn-add {
    display: inline-block;
    padding: 7px 12px;
    border: 1px dashed #2a2a2a;
    border-radius: 8px;
    color: #444;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Space Grotesk', sans-serif;
    transition: border-color 0.2s, color 0.2s;
}
.btn-add:hover { border-color: #fff; color: #fff; }

/* ── SHOT STRIP ── */
.shot-strip {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.shot-strip img {
    width: 100%;
    height: 54px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #222;
    display: block;
}

/* ── PRINT TAB ── */
.print-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 36px;
    align-items: start;
}

.layout-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.layout-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.layout-thumb:hover { border-color: #555; }
.layout-thumb.active { border-color: #fff; background: #1e1e1e; }
.layout-thumb span { font-size: 11px; color: #555; }
.layout-thumb.active span { color: #fff; }

.layout-icon {
    display: flex;
    gap: 2px;
    align-items: flex-end;
}

/* Strip 2 icon */
.strip2-icon { flex-direction: column; gap: 2px; }
.strip2-icon::before, .strip2-icon::after {
    content: '';
    display: block;
    width: 28px;
    height: 18px;
    background: #333;
    border-radius: 2px;
}
.layout-thumb.active .strip2-icon::before,
.layout-thumb.active .strip2-icon::after { background: #555; }

/* Strip 4 icon */
.strip4-icon { flex-direction: column; gap: 2px; }
.strip4-icon::before {
    content: '';
    display: block;
    width: 28px;
    height: 8px;
    background: #333;
    border-radius: 2px;
    box-shadow: 0 10px 0 #333, 0 20px 0 #333, 0 30px 0 #333;
}
.layout-thumb.active .strip4-icon::before { background: #555; box-shadow: 0 10px 0 #555, 0 20px 0 #555, 0 30px 0 #555; }

/* Grid icon */
.grid-icon {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 28px;
    height: 28px;
}
.grid-icon::before {
    content: '';
    display: block;
    background: #333;
    border-radius: 2px;
    box-shadow: 16px 0 0 #333, 0 16px 0 #333, 16px 16px 0 #333;
    width: 12px;
    height: 12px;
}
.layout-thumb.active .grid-icon::before { background: #555; box-shadow: 16px 0 0 #555, 0 16px 0 #555, 16px 16px 0 #555; }

/* Wide icon */
.wide-icon { flex-direction: row; gap: 2px; align-items: center; }
.wide-icon::before {
    content: '';
    display: block;
    width: 8px;
    height: 28px;
    background: #333;
    border-radius: 2px;
    box-shadow: 10px 0 0 #333, 20px 0 0 #333;
}
.layout-thumb.active .wide-icon::before { background: #555; box-shadow: 10px 0 0 #555, 20px 0 0 #555; }

/* Print bg swatches */
.print-bg-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bg-thumb {
    width: 32px; height: 32px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.bg-thumb:hover { border-color: #666; }
.bg-thumb.active { border-color: #fff; }

/* Print preview */
.print-preview-col {
    background: #0a0a0a;
    border-radius: 12px;
    border: 1px solid #1e1e1e;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.print-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

#printCanvas {
    max-width: 100%;
    max-height: 500px;
    display: block;
    border-radius: 4px;
}

.print-hint {
    font-size: 13px;
    color: #2a2a2a;
    text-align: center;
}