:root {
    --primary: #e6b800;
    --primary-dark: #b38f00;
    --bg-dark: #001a33;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-light: #ffffff;
    --text-dim: #a0a0a0;
    --danger: #ff3b3b;
    --success: #00ff88;
    --glass: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-dark);
    color: var(--text-light);
    height: 100vh;
    overflow: hidden;
}

/* Auth Screen */
.overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.checkin-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 30px;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--glass);
    text-align: center;
}

/* Side Menu */
.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100%;
    background: rgba(0, 10, 20, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1500;
    transition: right 0.3s ease;
    padding: 30px;
    border-left: 1px solid var(--glass);
}

.side-menu.active {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 10px;
}

.setting-group select,
.setting-group input[type="range"] {
    width: 100%;
    background: var(--glass);
    border: 1px solid var(--glass);
    color: white;
    padding: 10px;
    border-radius: 10px;
}

/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: var(--glass);
    border: none;
    font-size: 1.5rem;
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
}

/* Video Section */
.video-wrapper {
    position: relative;
    flex: 1;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#webcam {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#output_canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cam-off-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.cam-off-overlay .icon {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Controls & History */
.controls-panel {
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
}

.history-panel {
    margin-top: 20px;
    background: var(--glass);
    border-radius: 15px;
    padding: 15px;
    max-height: 150px;
    overflow-y: auto;
}

#event-list {
    list-style: none;
    font-size: 0.8rem;
}

#event-list li {
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
}

/* Buttons */
.primary-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.secondary-btn {
    width: 100%;
    padding: 12px;
    background: var(--glass);
    color: white;
    border: 1px solid var(--glass);
    border-radius: 10px;
    margin-top: 10px;
    cursor: pointer;
}

.danger-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 59, 59, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: 10px;
    margin-top: 10px;
    cursor: pointer;
}

/* Alert Overlay */
.alert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.alert-overlay.active {
    display: flex;
    animation: flash 0.5s infinite alternate;
}

@keyframes flash {
    from {
        background: rgba(255, 0, 0, 0.1);
    }

    to {
        background: rgba(255, 0, 0, 0.5);
    }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--glass);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.accent {
    color: var(--primary);
}