:root {
    --accent-color: #5865f2;
    --accent-hover: #4752c4;
    --success-green: #4ade80;
    --bg-dark: #050505;
    --card-bg: rgba(20, 20, 20, 0.95);
    --border-color: #333;
    --text-muted: #888;
}

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

body {
    background-color: var(--bg-dark);
    color: #fff;
    font-family: 'segoe ui', inter, system-ui, sans-serif;
    display: flex; justify-content: center; align-items: center;
    min-height: 100vh; overflow: hidden;
}

.background-grid {
    position: fixed; top: 0; left: 0; 
    width: 100%; height: 100%;
    background-image: radial-gradient(#1a1a1a 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: .4; z-index: -1;
}

#star_canvas {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    background: radial-gradient(circle at bottom, #1a1a2e 0%, #000000 100%);
    pointer-events: none;
}

.security-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    width: 90%; 
    max-width: 420px;
    min-height: 400px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,.5);
    backdrop-filter: blur(10px);
    display: flex; flex-direction: column;
    position: relative;
}

/* header bar */
.status-bar {
    background: #0f0f0f;
    padding: 12px 20px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    font-size: .8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px; /* gap between pulse/button/text */
}

/* audio btn next to pulse */
.audio-control {
    position: relative;
    width: 26px; height: 26px; /* slightly smaller */
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: .2s;
    color: #666;
    flex-shrink: 0;
}
.audio-control:hover { background: rgba(255,255,255,.1); color: #fff; }
.audio-icon { width: 12px; height: 12px; }

.pulse {
    width: 8px; height: 8px;
    background-color: var(--success-green);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success-green);
    animation: 2s infinite blink;
}

.content-wrapper {
    padding: 40px 30px;
    flex-grow: 1;
    position: relative;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
}

.panel-transition {
    width: 100%;
    display: flex; flex-direction: column; align-items: center;
    animation: fadeIn 0.5s ease-out;
}

.icon-header { color: var(--accent-color); margin-bottom: 15px; }
.title { font-size: 1.4rem; font-weight: 600; margin-bottom: 15px; letter-spacing: -.5px; }

.explanation-box {
    background: rgba(255,255,255,.03);
    border: 1px solid #222;
    padding: 15px; border-radius: 8px; margin-bottom: 25px;
    text-align: center;
}
.explanation-box p { font-size: .85rem; color: #aaa; margin-bottom: 5px; }
.explanation-box strong { color: #fff; }

.turnstile-wrapper { margin-bottom: 10px; }
.subtitle { font-size: .95rem; color: var(--text-muted); margin-bottom: 30px; }

.success-icon {
    width: 70px; height: 70px;
    background: rgba(74,222,128,.1);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}

.spinner {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.security-footer {
    background: #0a0a0a;
    padding: 15px 20px;
    border-top: 1px solid #222;
    display: flex; justify-content: space-between;
    font-size: .75rem; color: #666;
}
.footer-left { display: flex; gap: 5px; }
.value.mono { font-family: monospace; opacity: .7; }

/* fix stacking */
.hidden { display: none !important; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }