/* Base */
:root {
    --primary-bg: #050505;
    --terminal-bg: #0a0a0a;
    --terminal-border: #1a1a1a;
    --text-color: rgba(210, 210, 210, 0.9);
    --text-dim: rgba(180, 180, 180, 0.6);
    --highlight: #800000;
    --highlight-glow: rgba(128, 0, 0, 0.4);
    --shadow: #000000;
    --input-bg: rgba(15, 15, 15, 0.7);
    --button-bg: #1a1a1a;
    --button-hover: #2d2d2d;
    --warning: #a30000;
    --success: #245024;
}

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

body {
    background-color: var(--primary-bg);
    color: var(--text-color);
    font-family: 'IBM Plex Mono', monospace;
    height: 100vh;
    overflow: hidden;
    cursor: none;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
}

/* Œil de surveillance */
.surveillance-eye {
    position: fixed;
    width: 85px;
    height: 85px;
    border-radius: 50%;
    background: radial-gradient(circle at center, #440000 30%, #220000 70%, #110000 100%);
    box-shadow: 0 0 30px rgba(100, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.surveillance-eye::before {
    content: "";
    position: absolute;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #000;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

.surveillance-eye.active {
    opacity: 0.9;
}

/* Terminal */
.terminal {
    width: 650px;
    height: 600px;
    background-color: var(--terminal-bg);
    border: 1px solid var(--terminal-border);
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Scanlines effect */
.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    opacity: 0.6;
    z-index: 3;
}

.screen-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 60px rgba(40, 0, 0, 0.3);
    pointer-events: none;
    z-index: 2;
}

.terminal-header {
    height: 36px;
    background-color: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--terminal-border);
    display: flex;
    align-items: center;
    padding: 0 15px;
    position: relative;
    z-index: 4;
}

.recording-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--highlight);
    margin-right: 15px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
    }
}

.terminal-title {
    flex: 1;
    font-size: 14px;
    letter-spacing: 1px;
    text-align: center;
}

.date-time {
    font-size: 13px;
    opacity: 0.8;
}

.terminal-content {
    flex: 1;
    padding: 20px;
    overflow: auto;
    position: relative;
    z-index: 4;
}

.terminal-footer {
    height: 36px;
    background-color: rgba(0, 0, 0, 0.4);
    border-top: 1px solid var(--terminal-border);
    display: flex;
    align-items: center;
    padding: 0 15px;
    position: relative;
    z-index: 4;
}

.footer-text {
    opacity: 0.8;
    font-size: 14px;
    letter-spacing: 1px;
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background-color: var(--highlight);
    margin-left: 8px;
    animation: blink 1.2s infinite step-end;
}

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

/* Boot Sequence */
.boot-sequence {
    font-size: 14px;
    line-height: 1.6;
}

.text-line {
    margin-bottom: 10px;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Authentication Container */
.auth-container {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.auth-container.visible {
    opacity: 1;
}

.hidden {
    display: none;
}

.auth-header {
    font-size: 18px;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 2px;
}

/* Tabs */
.tab-container {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--terminal-border);
}

.tab {
    padding: 10px 15px;
    font-size: 14px;
    letter-spacing: 1px;
    cursor: none;
    opacity: 0.6;
    position: relative;
}

.tab.active {
    opacity: 1;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--highlight);
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.warning-message {
    background-color: rgba(80, 0, 0, 0.2);
    border-left: 2px solid var(--warning);
    padding: 12px 15px;
    font-size: 13px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--text-dim);
}

.input-container {
    position: relative;
    height: 40px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    height: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--terminal-border);
    color: var(--text-color);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    padding: 0 12px;
    outline: none;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: var(--highlight);
    box-shadow: 0 0 10px var(--highlight-glow);
}

.input-scan-effect {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background-color: rgba(128, 0, 0, 0.2);
    pointer-events: none;
    transition: width 0.1s linear;
    z-index: 5;
}

.input-container:focus-within .input-scan-effect {
    animation: scanInput 2s infinite linear;
}

@keyframes scanInput {
    0% {
        width: 0;
        opacity: 0.7;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        width: 100%;
        opacity: 0.7;
    }
}

.consent-container {
    display: flex;
    align-items: flex-start;
    margin-top: 8px;
}

input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 2px;
    appearance: none;
    width: 16px;
    height: 16px;
    background-color: var(--input-bg);
    border: 1px solid var(--terminal-border);
    position: relative;
    cursor: none;
}

input[type="checkbox"]:checked {
    background-color: var(--highlight);
}

input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background-color: var(--input-bg);
}

.consent-label {
    font-size: 12px;
    line-height: 1.5;
    display: inline;
    color: var(--text-color);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
}

.analysis-status {
    font-size: 13px;
    letter-spacing: 1px;
    color: var(--text-dim);
}

.auth-button {
    background-color: var(--button-bg);
    color: var(--text-color);
    border: 1px solid var(--terminal-border);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    padding: 10px 20px;
    cursor: none;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.auth-button:hover {
    background-color: var(--button-hover);
    border-color: var(--highlight);
    box-shadow: 0 0 10px var(--highlight-glow);
}

.auth-footer {
    margin-top: 30px;
    border-top: 1px solid var(--terminal-border);
    padding-top: 15px;
}

.auth-notice {
    font-size: 11px;
    text-align: center;
    letter-spacing: 1px;
    color: var(--text-dim);
}

/* Processing Overlay */
.processing-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.processing-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.scan-container {
    text-align: center;
}

.scan-animation {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid var(--terminal-border);
    position: relative;
    margin: 0 auto 20px;
}

.scan-animation::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--highlight);
    box-shadow: 0 0 20px var(--highlight-glow);
    animation: scanCircle 2s infinite linear;
}

@keyframes scanCircle {
    0% {
        transform: scale(0.2);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1.1);
        opacity: 0;
    }
}

.scan-text {
    font-size: 16px;
    letter-spacing: 1px;
    animation: blink 1.2s infinite step-end;
}

/* Recognition Box */
.recognition-box {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 150px;
    border: 1px solid var(--highlight);
    background-color: rgba(10, 10, 10, 0.7);
    padding: 5px;
    z-index: 5;
    display: none;
}

.recognition-box.active {
    display: block;
}

.recognition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    height: 120px;
}

.grid-cell {
    background-color: rgba(30, 0, 0, 0.3);
    position: relative;
}

.grid-cell::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(128, 0, 0, 0.2);
    left: 0;
    top: 0;
    animation: cellScan 1.5s infinite linear;
    animation-delay: calc(var(--cell-index) * 0.2s);
}

.recognition-status {
    margin-top: 5px;
    font-size: 10px;
    text-align: center;
    animation: blink 1s infinite step-end;
}

/* Alert Overlay */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.alert-overlay.active {
    opacity: 1;
    pointer-events: all;
    animation: alertPulse 2s infinite alternate;
}

@keyframes alertPulse {
    0% {
        background-color: rgba(10, 0, 0, 0.85);
    }
    100% {
        background-color: rgba(50, 0, 0, 0.85);
    }
}

.alert-box {
    width: 460px;
    background-color: rgba(15, 0, 0, 0.95);
    border: 1px solid var(--warning);
    padding: 25px;
    text-align: center;
}

.alert-title {
    font-size: 18px;
    color: var(--warning);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.alert-message {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    color: var(--text-color);
}

.alert-action {
    font-size: 13px;
    color: var(--text-dim);
    letter-spacing: 1px;
    animation: blink 1s infinite;
}

/* Custom cursor */
body, button, a, input, label {
    cursor: none;
}

/* Responsive */
@media (max-width: 768px) {
    .terminal {
        width: 95%;
        height: 90vh;
    }
    
    .surveillance-eye {
        width: 70px;
        height: 70px;
    }
    
    .surveillance-eye::before {
        width: 25px;
        height: 25px;
    }
}
