/* Reset Básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
}

:root {
    --green: #00ff41;
    --green-bright: #7fff9b;
    --green-dim: rgba(0, 255, 65, 0.55);
    --bg: #040a04;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg);
    font-family: 'JetBrains Mono', monospace;
    color: #ffffff;
}

/* Canvas ocupa 100% da viewport */
#canvas-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Vinheta sutil para dar profundidade */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
}

/* Scanlines sutis (estilo CRT) */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 255, 65, 0.028) 0px,
        rgba(0, 255, 65, 0.028) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.5;
}

/* Interface Centralizada */
.ui-container {
    position: relative;
    z-index: 4;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none; /* Deixa o mouse interagir com o fundo */
}

/* Janela de Terminal */
.terminal {
    width: min(92vw, 640px);
    background: rgba(4, 12, 6, 0.82);
    border: 1px solid rgba(0, 255, 65, 0.35);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.12),
                inset 0 0 18px rgba(0, 255, 65, 0.05);
    overflow: hidden;
    animation: term-breathe 4.5s ease-in-out infinite;
}

@keyframes term-breathe {
    0%, 100% {
        box-shadow: 0 0 26px rgba(0, 255, 65, 0.1),
                    inset 0 0 16px rgba(0, 255, 65, 0.04);
    }
    50% {
        box-shadow: 0 0 55px rgba(0, 255, 65, 0.25),
                    inset 0 0 26px rgba(0, 255, 65, 0.1);
    }
}

/* Barra superior do terminal */
.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 255, 65, 0.25);
    background: rgba(0, 255, 65, 0.04);
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    opacity: 0.85;
}

.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }

.term-title {
    margin-left: auto;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--green-dim);
    text-transform: lowercase;
}

/* Corpo do terminal */
.terminal-body {
    padding: clamp(1.4rem, 4vw, 2.2rem) clamp(1.2rem, 4vw, 2rem);
    text-align: center;
}

.prompt-line {
    font-size: clamp(0.8rem, 2vw, 1rem);
    color: var(--green-dim);
    margin-bottom: 1.2rem;
    letter-spacing: 1px;
    text-align: left;
}

.prompt { color: var(--green); }
.cmd { color: var(--green-bright); }

.time-display {
    font-family: 'Share Tech Mono', monospace;
    font-size: clamp(3.4rem, 13vw, 7rem);
    font-weight: 400;
    letter-spacing: 4px;
    line-height: 1.05;
    color: var(--green);
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.7),
                 0 0 24px rgba(0, 255, 65, 0.4);
    animation: time-pulse 4s ease-in-out infinite;
}

@keyframes time-pulse {
    0%, 100% { text-shadow: 0 0 8px rgba(0, 255, 65, 0.55), 0 0 20px rgba(0, 255, 65, 0.3); }
    50%      { text-shadow: 0 0 12px rgba(0, 255, 65, 0.95), 0 0 34px rgba(0, 255, 65, 0.55); }
}

.date-display {
    font-size: clamp(0.75rem, 2vw, 0.95rem);
    font-weight: 300;
    color: var(--green-dim);
    margin-top: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* Linha de status */
.status-line {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px dashed rgba(0, 255, 65, 0.2);
    font-size: clamp(0.7rem, 1.8vw, 0.85rem);
    color: var(--green-dim);
    letter-spacing: 1px;
}

.ok { color: var(--green); }

.cursor-blink {
    color: var(--green-bright);
    animation: blink 1s steps(1) infinite;
}

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

/* Tela de Entrada (Overlay) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(4, 10, 4, 0.92);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.overlay-card {
    background: rgba(4, 12, 6, 0.92);
    padding: 3rem;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(0, 255, 65, 0.35);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8),
                0 0 30px rgba(0, 255, 65, 0.1);
    max-width: 460px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.overlay-card h1 {
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.5rem;
    color: var(--green);
    margin-bottom: 1rem;
    letter-spacing: 3px;
    text-shadow: 0 0 12px rgba(0, 255, 65, 0.5);
}

.overlay-card p {
    color: var(--green-dim);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.overlay-card p strong {
    color: var(--green-bright);
}

/* Botão Glow */
.btn-glow {
    font-family: 'Share Tech Mono', monospace;
    background: var(--green);
    border: none;
    color: #041004;
    font-weight: 700;
    padding: 1rem 2rem;
    font-size: 0.95rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.8);
}
