:root {
    --bg-color: #050505;
    --text-main: #00ffcc;
    --text-dim: #008866;
    --text-alert: #ff0055;
    --text-warn: #ffcc00;
    --border-color: rgba(0, 255, 204, 0.3);
    --bg-panel: rgba(0, 30, 20, 0.6);
    --font-mono: 'Share Tech Mono', monospace;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-mono);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    user-select: none;
}

/* CRT and Scanline Effects */
.crt-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
    z-index: 998;
}

.scanlines {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.2)
    );
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 999;
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 10;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.1), inset 0 0 20px rgba(0, 255, 204, 0.05);
    padding: 2rem;
    position: relative;
    backdrop-filter: blur(5px);
}

.panel::before, .panel::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-main);
}
.panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

h1, h2 {
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--text-main);
}

.text-alert { color: var(--text-alert); text-shadow: 0 0 10px var(--text-alert); }
.text-warn { color: var(--text-warn); text-shadow: 0 0 10px var(--text-warn); }
.text-dim { color: var(--text-dim); }

p {
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 1.1rem;
}

button {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-main);
    padding: 0.8rem 1.5rem;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.2s ease;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.2);
    margin-top: 1rem;
}

button:hover {
    background: var(--text-main);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--text-main);
}

input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--text-dim);
    color: var(--text-main);
    padding: 0.8rem;
    font-family: var(--font-mono);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    outline: none;
    transition: border 0.2s ease;
}

input[type="text"]:focus {
    border-color: var(--text-main);
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.3);
}

.timer-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--text-dim);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.timer-bar {
    height: 100%;
    width: 100%;
    background: var(--text-main);
    box-shadow: 0 0 10px var(--text-main);
    transform-origin: left;
}

.timer-bar.warning { background: var(--text-warn); box-shadow: 0 0 10px var(--text-warn); }
.timer-bar.critical { background: var(--text-alert); box-shadow: 0 0 10px var(--text-alert); }

/* Grid for CAPTCHA */
.captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 1.5rem 0;
}

.captcha-cell {
    aspect-ratio: 1;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    cursor: pointer;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: filter 0.2s ease, transform 0.1s ease;
}

.captcha-cell:hover {
    filter: brightness(1.2);
}

.captcha-cell:active {
    transform: scale(0.95);
}

.captcha-cell.selected::after {
    content: '';
    position: absolute;
    top: 5px; right: 5px; bottom: 5px; left: 5px;
    border: 3px solid var(--text-main);
    box-shadow: inset 0 0 10px var(--text-main), 0 0 10px var(--text-main);
    pointer-events: none;
}

.glitch {
    animation: glitch 1s linear infinite;
}

@keyframes glitch {
    2%, 64% { transform: translate(2px,0) skew(0deg); }
    4%, 60% { transform: translate(-2px,0) skew(0deg); }
    62% { transform: translate(0,0) skew(5deg); }
}

.uuid-text-area {
    width: 100%;
    height: 150px;
    background: #000;
    color: var(--text-dim);
    font-size: 0.8rem;
    overflow-y: scroll;
    padding: 10px;
    border: 1px solid var(--border-color);
    word-break: break-all;
    margin-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--text-main) #000;
}

.hidden-key {
    display: none;
}
