:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --accent-color: #ffffff;
    --surface-color: rgba(255, 255, 255, 0.1);
    --border-radius: 24px;
    --font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    position: relative;
}

header {
    padding: 2.5rem 1rem 1rem 1rem;
    text-align: center;
    position: absolute;
    top: 1rem;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    justify-content: center;
    align-items: center;
}

.lang-toggle {
    position: absolute;
    top: 2rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    /* 50% alpha */
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    z-index: 20;
    transition: all 0.2s ease;
}

.lang-toggle:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.7);
}

.mode-toggle {
    position: absolute;
    top: 2rem;
    left: 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    /* 50% alpha */
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 20px;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    z-index: 20;
    transition: all 0.2s ease;
}

.mode-toggle:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.7);
}

h1 {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background-color: #111;
}

.camera-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-color: #000;
}

video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 20;
}

.flash.active {
    animation: flash-animation 0.3s ease-out;
}

@keyframes flash-animation {
    0% {
        opacity: 0.8;
    }

    100% {
        opacity: 0;
    }
}

.status-indicator {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-top: 1rem;
    display: inline-block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 80px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 20%, transparent);
    z-index: 10;
}

.capture-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: transparent;
    border: 4px solid white;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.capture-btn:active {
    transform: scale(0.95);
    background-color: rgba(255, 255, 255, 0.1);
}

.inner-circle {
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.capture-btn:active .inner-circle {
    transform: scale(0.85);
}

/* Resume State (Play Icon) */
.capture-btn.resume .inner-circle {
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 26px solid #4ade80;
    /* Green accent */
    background-color: transparent;
    border-radius: 0;
    transform: translateX(4px);
    /* Center visually */
}

.capture-btn.resume {
    border-color: #4ade80;
}

.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(30, 30, 30, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification.error {
    border-color: rgba(255, 59, 48, 0.5);
    background: rgba(40, 10, 10, 0.95);
}

.notification.success {
    border-color: rgba(52, 199, 89, 0.5);
}

/* Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-right: 8px;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (min-width: 600px) {
    .container {
        border-radius: var(--border-radius);
        margin: 20px auto;
        height: calc(100vh - 40px);
        overflow: hidden;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
        border: 1px solid #333;
    }
}