@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #0b0c10;
    --card-bg: rgba(20, 22, 30, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-glow: rgba(99, 102, 241, 0.12);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-color: #6366f1;
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --button-bg: rgba(255, 255, 255, 0.06);
    --button-hover: rgba(255, 255, 255, 0.12);
    --viewfinder-color: rgba(255, 255, 255, 0.75);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Background grid & glows */
body::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
}

body::after {
    content: "";
    position: absolute;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    filter: blur(60px);
}

/* Main card container */
.container {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5),
        0 0 40px var(--card-glow);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.container:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

/* Header style */
h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 6px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-weight: 400;
    line-height: 1.4;
}

/* Image container */
.kep-galeria {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-width: 320px;
    margin: 0 auto 24px auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #050508;
}

.kep-galeria img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    border-radius: 19px;
}

/* 2FPS Alternating Animation:
   kep2 is in background (z-index: 1).
   kep1 is on top (z-index: 2) and blinks on/off every 1 second (0.5s visible, 0.5s invisible) */
.kep1 {
    z-index: 2;
    animation: fps2-blink 1s infinite steps(1);
}

.kep2 {
    z-index: 1;
}

@keyframes fps2-blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Pause animation state */
.paused .kep1 {
    animation-play-state: paused !important;
}

/* Viewfinder Overlays */
.viewfinder {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    transition: opacity 0.3s ease;
}

.viewfinder.hidden {
    opacity: 0;
}

/* Viewfinder corner crop marks */
.corner {
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--viewfinder-color);
}

.top-left {
    top: 12px;
    left: 12px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: 12px;
    right: 12px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: 12px;
    left: 12px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: 12px;
    right: 12px;
    border-left: none;
    border-top: none;
}

/* Camera UI text tags */
.v-top,
.v-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.tag {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.5px;
}

.tag-rec {
    border-color: rgba(239, 68, 68, 0.3);
}

.rec-dot {
    width: 7px;
    height: 7px;
    background-color: #ef4444;
    border-radius: 50%;
    animation: dot-pulse 1s infinite steps(1);
}

@keyframes dot-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.tag-fps {
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.3);
}

.tag-shutter {
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Control buttons area */
.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.btn {
    background: var(--button-bg);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    padding: 12px 20px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: var(--button-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

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

.btn.active {
    background: var(--accent-gradient);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

/* Responsive */
@media (max-width: 480px) {
    .container {
        padding: 24px 16px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .kep-galeria {
        max-width: 270px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
}