@import url('https://fonts.googleapis.com/css2?family=Orbitron&family=Electrolize&display=swap');

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    background-color: #0d0d0d;
    font-family: 'Orbitron', sans-serif;
    color: #00ffea;
    text-align: center;
    margin: 0;
    padding: 0;
}

.scan { display: none; }

.portal-shell {
    width: 100%;
    margin: 0 auto;
}

.login-panel {
    max-width: 400px;
    margin: 50px auto;
}

.login-core {
    padding: 20px;
    border: 2px solid #00ffea;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 255, 234, 0.7);
    background: rgba(20, 20, 20, 0.9);
}

h1 {
    color: #00ffea;
    text-shadow: 0 0 8px #00ffea;
}

.login-core h1 { margin: 0.67em 0; font-size: 2em; }
.login-core > p { font-size: 16px; }

input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background: #000;
    border: 1px solid #00ffea;
    color: #00ffea;
    font-family: 'Electrolize', sans-serif;
    font-size: 16px;
    text-align: center;
}

input:focus {
    outline: none;
    box-shadow: 0 0 10px #00ffea;
}

button {
    background: linear-gradient(90deg, #00ffea, #0066ff);
    border: none;
    padding: 12px 20px;
    color: #000;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 0 10px #00ffea;
}

button:hover {
    box-shadow: 0 0 20px #00ffea;
    transform: scale(1.05);
}

.login-core button { width: 100%; }
.register-link { margin:18px 0 2px; color:#78aaa5; font-family:'Electrolize',sans-serif; font-size:13px; }
.register-link a { color:#00ffea; }

.message {
    min-height: 17px;
    margin-top: 15px;
    color: lime;
    font-size: 14px;
}

.login-panel.opening { animation: portalExpand 0.65s ease-in forwards; }
@keyframes portalExpand {
    0% { transform: scaleX(1); opacity: 1; }
    70% { transform: scaleX(1.08); opacity: 0.65; }
    100% { transform: scaleX(1.15); opacity: 0; }
}

.console {
    width: min(1180px, calc(100% - 30px));
    margin: 25px auto;
    border: 2px solid #00ffea;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 255, 234, 0.7);
    background: rgba(20, 20, 20, 0.9);
    overflow: hidden;
    animation: consoleOpen 0.6s ease-out both;
}

@keyframes consoleOpen {
    from { width: 400px; max-height: 240px; opacity: 0; }
    to { max-height: 1200px; opacity: 1; }
}

.console > header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #00ffea;
}

.console > header h1 { margin: 0 0 8px; }
.console > header p { margin: 0; font-family: 'Electrolize', sans-serif; }
.identity { text-align: right; }
.identity span { display: block; font-family: 'Electrolize', sans-serif; font-size: 12px; }
.identity b { display: inline-block; margin: 8px 12px 0 0; color: lime; }
.identity button { padding: 8px 12px; font-size: 12px; }

.session-line {
    padding: 10px 18px;
    border-bottom: 1px solid #00ffea;
    font-family: 'Electrolize', sans-serif;
    font-size: 13px;
}
.session-line b { color: lime; }
.session-line #warning { float: right; color: #ff0077; }
.live { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: lime; box-shadow: 0 0 8px lime; }

.console-grid {
    display: grid;
    grid-template-columns: 225px minmax(0, 1fr) 225px;
    min-height: 670px;
}

.access-column,
.history-column { padding: 20px; }
.access-column { border-right: 1px solid #00ffea; }
.history-column { border-left: 1px solid #00ffea; }
.access-column h2,
.history-column h2 { margin: 0 0 18px; color: #00ffea; text-shadow: 0 0 8px #00ffea; font-size: 18px; }
.access-column p,
#codeStatus,
.history-list { font-family: 'Electrolize', sans-serif; font-size: 14px; line-height: 1.5; }
.access-column button { width: 100%; margin-top: 5px; }
#codeStatus { margin-top: 15px; color: #ff0077; }

.challenge-column { position: relative; min-width: 0; background: #0d0d0d; }
.empty-state { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; }
.challenge-column.challenge-loaded .empty-state { display: none; pointer-events: none; }
.challenge-column:not(.challenge-loaded) iframe { display: none; }
.empty-state .reticle { display: grid; place-items: center; width: 80px; height: 80px; border: 2px solid #00ffea; color: #00ffea; font-size: 28px; box-shadow: 0 0 15px rgba(0, 255, 234, 0.7); }
.empty-state b { text-shadow: 0 0 8px #00ffea; }
.empty-state span { font-family: 'Electrolize', sans-serif; opacity: 0.75; }
iframe { width: 100%; height: 100%; min-height: 670px; border: 0; background: #0d0d0d; }

.history-list { display: grid; gap: 10px; }
.history-item { padding: 10px; border: 1px solid #00ffea; background: #000; text-align: left; }
.history-item b, .history-item span { display: block; }
.history-item b { color: #00ffea; font-family: 'Orbitron', sans-serif; font-size: 12px; }
.history-item span { margin-top: 5px; color: #7dc9c2; font-size: 12px; }
.history-item em { float: right; color: lime; font-style: normal; }

@media (max-width: 800px) {
    .console-grid { grid-template-columns: 1fr; }
    .access-column { border-right: 0; border-bottom: 1px solid #00ffea; }
    .history-column { border-left: 0; border-top: 1px solid #00ffea; }
    .challenge-column, iframe { min-height: 600px; }
    .history-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .login-panel { width: calc(100% - 30px); margin: 25px auto; }
    .console { width: calc(100% - 20px); margin: 10px auto; }
    .console > header { align-items: flex-start; flex-direction: column; }
    .identity { text-align: left; }
    .challenge-column, iframe { min-height: 560px; }
    .history-list { grid-template-columns: 1fr; }
}
