:root {
    --primary-color: #00f2ff;
    --accent-color: #7000ff;
    --glass-bg: rgba(20, 25, 40, 0.85);
    --text-color: #ffffff;
    --correct-color: #00e676;
    --wrong-color: #ff1744;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    background: #050810;
    position: relative;
}

.circuit-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.circuit-path {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.3;
    filter: drop-shadow(0 0 5px var(--primary-color));
}

.circuit-pulse {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 20 1000;
    stroke-dashoffset: 1000;
    animation: pulseFlow 4s linear infinite;
    filter: drop-shadow(0 0 8px #fff);
}

.pulse-accent { stroke: var(--accent-color); filter: drop-shadow(0 0 8px var(--accent-color)); animation-duration: 6s; }
.pulse-slow { animation-duration: 8s; }
.path-accent { stroke: var(--accent-color); opacity: 0.2; }

@keyframes pulseFlow {
    to {
        stroke-dashoffset: 0;
    }
}

.grid-overlay {
    position: absolute;
    top:0; left:0; right:0; bottom:0;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -2;
}

.container {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 92%;
    max-width: 650px;
    border-radius: 24px;
    padding: 35px;
    box-shadow: 
        0 0 30px rgba(0, 242, 255, 0.1),
        inset 0 0 20px rgba(0, 242, 255, 0.05);
    border: 1px solid rgba(0, 242, 255, 0.15);
    text-align: center;
    animation: fadeIn 0.6s ease-out;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -2px; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--accent-color), transparent);
    animation: borderFlow 4s linear infinite;
    background-size: 200% 100%;
}
@keyframes borderFlow {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

header h1 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 2.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    font-size: 0.95rem;
    color: #ccc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

#question {
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.4;
}

.btn-grid {
    display: grid;
    gap: 15px;
}

.btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 15px 20px;
    color: var(--text-color);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.btn:hover:not([disabled]) {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 20px var(--primary-color);
    transform: translateX(5px);
}

.btn:disabled {
    cursor: default;
}

.btn.correct {
    background-color: var(--correct-color) !important;
    border-color: var(--correct-color) !important;
    color: #000 !important;
    box-shadow: 0 0 15px var(--correct-color);
}

.btn.wrong {
    background-color: var(--wrong-color) !important;
    border-color: var(--wrong-color) !important;
    opacity: 0.7;
}

.controls {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.action-btn {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(112, 0, 255, 0.6);
}

.hide {
    display: none;
}

.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    font-size: 2.5rem;
    font-weight: bold;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 500px) {
    header h1 { font-size: 1.6rem; }
    #question { font-size: 1.1rem; }
    .btn { font-size: 0.95rem; padding: 12px; }
    .container { padding: 20px; width: 95%; }
}