:root {
    --camcorder-bg: #1a1a1a;
    --bezel-color: #0d0d0d;
    --silver: #8a8d91;
    --lcd-bg: #000;
    --neon-green: #39ff14;
    --neon-green-glow: rgba(57, 255, 20, 0.6);
    --neon-white: #e0ffd4;
    --amber-glow: rgba(255, 140, 0, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: radial-gradient(circle at center, #2a2a2a 0%, #050505 100%);
    font-family: 'VT323', monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: var(--neon-green);
    overflow: hidden;
}

/* Camcorder Body Frame for desktop preview, expands fully on mobile */
.camcorder-body {
    width: 100%;
    height: 100vh;
    max-width: 440px;
    background: var(--camcorder-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.8), inset 0 0 20px rgba(255,255,255,0.05);
}

@media (min-width: 450px) {
    .camcorder-body {
        height: 85vh;
        max-height: 900px;
        border-radius: 24px;
        border: 4px solid #333;
        border-right-color: #111;
        border-bottom-color: #111;
        transform: perspective(800px) rotateY(-2deg) rotateX(2deg); /* Slight 3D tilt */
        box-shadow: 20px 20px 40px rgba(0,0,0,0.7), inset 2px 2px 5px rgba(255,255,255,0.1);
    }
}

/* Thick Bezel */
.screen-bezel {
    flex: 1;
    background: var(--bezel-color);
    margin: 10px;
    border-radius: 12px;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 15px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.9), 0 2px 4px rgba(255,255,255,0.05);
}

.branding {
    font-family: Arial, sans-serif;
    color: var(--silver);
    font-size: 10px;
    letter-spacing: 1px;
    text-align: center;
    margin-bottom: 8px;
    font-weight: bold;
    text-shadow: -1px -1px 0 #000, 1px 1px 0 rgba(255,255,255,0.2);
}

.branding span {
    color: #cc0000;
    margin-left: 8px;
}

/* LCD Display Area */
.lcd-display {
    flex: 1;
    background: var(--lcd-bg);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 15px #000, 0 0 0 2px #000;
}

/* Media Box */
.media-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
}

.media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.3) saturate(1.2) contrast(1.1);
}

/* ---- VINTAGE OVERLAYS ---- */

.effect-scanlines {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.1) 50%,
        rgba(0,0,0,0.1)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
}

.effect-vignette {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 50%, rgba(0,0,0,0.7) 120%);
    pointer-events: none;
    z-index: 11;
    box-shadow: inset 0 0 40px var(--amber-glow);
}

.effect-crt-flicker {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.02);
    opacity: 0.1;
    pointer-events: none;
    z-index: 12;
    animation: crtFlicker 0.15s infinite;
}

.effect-tracking {
    position: absolute;
    width: 100%;
    height: 10%;
    background: rgba(255, 255, 255, 0.05);
    top: -10%;
    left: 0;
    pointer-events: none;
    z-index: 13;
    animation: trackingLine 8s infinite linear;
    filter: blur(2px);
}

.effect-crosshair {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 14;
    opacity: 0.15;
}

.cross-x {
    position: absolute;
    top: 50%; left: 10%; width: 80%; height: 1px;
    background: var(--neon-green);
}

.cross-y {
    position: absolute;
    top: 10%; left: 50%; width: 1px; height: 80%;
    background: var(--neon-green);
}

/* ---- UI LAYER ---- */

.ui-layer {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    pointer-events: none;
}

.text-glow {
    color: var(--neon-white);
    text-shadow: 0 0 5px var(--neon-green-glow), 0 0 10px var(--neon-green-glow);
    font-size: 1.2rem;
}

/* Header */
.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.status-left, .status-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.status-right {
    align-items: flex-end;
}

.status-center {
    font-size: 1.4rem;
    font-weight: bold;
}

/* Battery */
.battery-icon {
    width: 30px;
    height: 14px;
    border: 2px solid var(--neon-white);
    border-radius: 2px;
    position: relative;
    box-shadow: 0 0 5px var(--neon-green-glow);
}
.battery-icon::before {
    content: '';
    position: absolute;
    right: -4px;
    top: 2px;
    width: 2px;
    height: 6px;
    background: var(--neon-white);
    box-shadow: 0 0 5px var(--neon-green-glow);
}
.battery-level {
    width: 50%;
    height: 100%;
    background: var(--neon-white);
    box-shadow: 0 0 5px var(--neon-green-glow);
}

.memory-label {
    font-size: 0.9rem;
    margin-top: 2px;
}

/* Controls Area */
.controls-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto; /* Allow clicking buttons */
}

/* Timeline */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    width: 24%;
    height: 100%;
    background: var(--neon-white);
    box-shadow: 0 0 8px var(--neon-green-glow);
    transition: width 0.1s linear;
}

.timecode {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* Buttons */
.transport-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 10px 0;
}

.ctrl-btn {
    background: rgba(20,20,20,0.8);
    border: 2px solid #444;
    color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.8), inset 1px 1px 2px rgba(255,255,255,0.1);
    transition: all 0.1s;
}

.ctrl-btn:active {
    transform: scale(0.95);
    box-shadow: inset 2px 2px 10px rgba(0,0,0,0.8);
}

.ctrl-btn:not(.play-btn) {
    width: 50px;
    height: 50px;
}

.play-btn {
    width: 70px;
    height: 70px;
    background: linear-gradient(145deg, #2a2a2a, #111);
    border: 3px solid #555;
    color: var(--neon-white);
    box-shadow: 4px 4px 10px rgba(0,0,0,0.9), inset 2px 2px 5px rgba(255,255,255,0.2);
}

.play-btn:active {
    background: #111;
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: inset 4px 4px 15px #000, 0 0 15px var(--neon-green-glow);
}

/* Thumbnail Strip */
.thumbnail-strip {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0 15px 0;
    scrollbar-width: none; /* Firefox */
}
.thumbnail-strip::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.thumb {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
    border: 2px solid #333;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.2s;
    cursor: pointer;
}

.thumb.active {
    border-color: var(--neon-green);
    box-shadow: 0 0 10px var(--neon-green-glow);
    opacity: 1;
    transform: scale(1.05);
}

.footer-msg {
    text-align: center;
    font-size: 1rem;
    font-style: italic;
    opacity: 0.8;
    margin-top: -5px;
}

/* Animations */
@keyframes crtFlicker {
    0% { opacity: 0.05; }
    50% { opacity: 0.15; }
    100% { opacity: 0.08; }
}

@keyframes trackingLine {
    0% { top: -10%; }
    40% { top: 110%; }
    100% { top: 110%; }
}

.blink-slow {
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.2; }
}
