/* portal_start/static/portal_start/css/portal.css */

html, body {
    margin: 0;
    width: 100%;
    height: 100%;
    background: #05070c;
    color: #c7f0ff;
    font-family: 'VT323', monospace;
    overflow: hidden;
}

#noise {
    position: fixed;
    inset: 0;
    background: url("https://i.imgur.com/8Yq6K0Z.png");
    opacity: .035;
    pointer-events: none;
    z-index: 2;
}

#container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 3;
    position: relative;
}

.box {
    max-width: 560px;
    padding: 48px 52px;
    border: 1px solid #1c4d6b;
    background: rgba(0, 0, 0, .48);
    box-shadow: 0 0 120px rgba(0, 200, 255, .18);
    animation: breathe 6s infinite ease-in-out;
    transition: .35s;
    position: relative;
}

h1 {
    color: #5fe3ff;
    text-shadow: 0 0 20px rgba(95, 227, 255, 0.5);
    letter-spacing: 8px;
    margin-bottom: 20px;
}

@keyframes breathe {
    0%   { box-shadow: 0 0 70px rgba(0, 200, 255, .12); }
    50%  { box-shadow: 0 0 150px rgba(0, 200, 255, .28); }
    100% { box-shadow: 0 0 70px rgba(0, 200, 255, .12); }
}

.box.glitch {
    animation: glitch .22s steps(2, end) 3;
}

@keyframes glitch {
    0%   { transform: translate(0, 0); }
    20%  { transform: translate(-3px, 2px); }
    40%  { transform: translate(3px, -2px); }
    60%  { transform: translate(-2px, 2px); }
    80%  { transform: translate(2px, -2px); }
    100% { transform: translate(0, 0); }
}

.line {
    height: 1px;
    background: #1c4d6b;
    margin: 20px 0;
}

p {
    font-size: 22px;
    line-height: 1.6;
    color: #a6dfff;
}

#message {
    margin-top: 26px;
    font-size: 18px;
    letter-spacing: 2px;
    opacity: 0;
    transition: 1s;
    min-height: 24px;
}

#hint {
    font-size: 14px;
    opacity: .4;
    margin-top: 10px;
    letter-spacing: 2px;
}

/* =========================
   WELCOME
========================= */

#welcome, .welcome {
    font-size: 18px;
    color: #7CFF9E;
    margin-bottom: 8px;
    text-shadow: 0 0 6px rgba(124, 255, 158, 0.6);
    animation: flicker 2.4s infinite alternate;
}

@keyframes flicker {
    0%   { opacity: 0.85; }
    100% { opacity: 1; }
}

/* =========================
   TERMINAL
========================= */

#revealForm.hidden {
    display: none;
}

.terminal {
    margin-top: 30px;
    background: rgba(0, 0, 0, .55);
    border: 1px solid #2aa8ff;
    box-shadow: 0 0 30px rgba(0, 200, 255, .25);
    padding: 22px;
    position: relative;
    animation: fadeIn .6s forwards;
}

.terminal-header {
    color: #5fe3ff;
    font-size: 14px;
    letter-spacing: 3px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1c4d6b;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.terminal-body {
    text-align: left;
}

.terminal-line {
    color: #a6dfff;
    margin-bottom: 6px;
    line-height: 1.6;
}

.terminal-input {
    width: 100%;
    margin: 8px 0;
    background: black;
    border: 1px solid #1c4d6b;
    color: #c7f0ff;
    font-family: inherit;
    font-size: 18px;
    padding: 10px;
    box-sizing: border-box;
}

.terminal-input:focus {
    outline: none;
    border-color: #5fe3ff;
    box-shadow:
        0 0 8px rgba(95, 227, 255, .5),
        inset 0 0 10px rgba(95, 227, 255, .25);
}

.terminal-input.hidden {
    display: none;
}

.terminal-btn {
    margin-top: 14px;
    padding: 10px 22px;
    font-family: inherit;
    font-size: 16px;
    background: #07141f;
    border: 1px solid #5fe3ff;
    color: #5fe3ff;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.terminal-btn:hover:not(:disabled) {
    background: #0a2233;
    box-shadow: 0 0 15px rgba(95, 227, 255, 0.3);
}

.terminal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.terminal-btn.hidden {
    display: none;
}

.terminal-confirm {
    color: #7CFF9E;
    line-height: 1.8;
}

.terminal-confirm.hidden {
    display: none;
}

.terminal-error {
    color: #ff6b6b;
    margin-top: 10px;
    line-height: 1.6;
}

.terminal-error.hidden {
    display: none;
}

/* =========================
   SCANLINES
========================= */

.scanlines {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        to bottom,
        rgba(255, 255, 255, .02),
        rgba(255, 255, 255, .02) 1px,
        transparent 1px,
        transparent 3px
    );
}

/* =========================
   LOADING
========================= */

.loading {
    display: inline-block;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
