:root {
    --hacker-green: #00ff41;
    --pro-blue: #3b82f6;
    --gold: #d4af37;
    --dark-bg: #030712;
    --card-bg: rgba(17, 24, 39, 0.9);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Cairo', 'Fira Code', monospace;
    background-color: var(--dark-bg);
    color: #e6edf3;
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Matrix Background */
#matrixCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    opacity: 0.15;
}

.app { display: flex; width: 100%; height: 100vh; }

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(1, 4, 9, 0.9);
    backdrop-filter: blur(15px);
    padding: 25px;
    border-right: 1px solid rgba(59, 130, 246, 0.3);
    display: flex;
    flex-direction: column;
}

.sidebar h3 {
    font-size: 0.85rem;
    color: var(--pro-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    border-bottom: 1px solid #30363d;
    padding-bottom: 10px;
}

#unanswered {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    overflow-y: auto;
}

.sidebar li {
    cursor: pointer;
    padding: 8px;
    text-align: center;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    border: 1px solid transparent;
    transition: 0.3s;
}

.sidebar li.answered { 
    border-color: var(--hacker-green); 
    color: var(--hacker-green); 
}

.sidebar li:hover { 
    background: var(--pro-blue); 
    color: white; 
}

/* Main Card */
.card {
    background: var(--card-bg);
    margin: auto;
    width: 95%;
    max-width: 850px;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.2);
    position: relative;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.hacker-brand {
    font-family: 'Fira Code';
    color: var(--pro-blue);
    font-weight: 800;
    font-size: 1.5rem;
}

.hacker-brand span { 
    color: #fff; 
    text-shadow: 0 0 10px var(--pro-blue); 
}

.timer-box {
    background: #000;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 15px;
    border-radius: 5px;
    font-family: 'Fira Code';
    font-size: 1.1rem;
}

/* Question Content */
.q-text {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #fff;
    line-height: 1.5;
    min-height: 80px;
}

label {
    display: flex;
    align-items: center;
    padding: 18px;
    background: rgba(13, 17, 23, 0.6);
    margin-bottom: 15px;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #30363d;
    transition: 0.3s;
}

label:hover { 
    border-color: var(--pro-blue); 
    transform: translateX(5px); 
}

input[type="checkbox"] {
    width: 20px; 
    height: 20px;
    margin-right: 15px;
    accent-color: var(--pro-blue);
}

/* Buttons */
.actions { 
    display: flex; 
    gap: 15px; 
    margin-top: 30px; 
}

button {
    flex: 1; 
    padding: 15px; 
    border: none; 
    border-radius: 8px;
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s;
    font-family: 'Fira Code'; 
    text-transform: uppercase;
}

.btn-prev { 
    background: #30363d; 
    color: #fff; 
}

.btn-check { 
    background: transparent; 
    border: 1px solid var(--hacker-green); 
    color: var(--hacker-green); 
}

.btn-next { 
    background: var(--pro-blue); 
    color: white; 
}

button:hover { 
    filter: brightness(1.2); 
    transform: scale(1.02); 
    box-shadow: 0 0 15px var(--pro-blue); 
}

#result { 
    margin-top: 20px; 
    font-family: 'Fira Code'; 
    font-size: 0.9rem;
    height: 20px;
}

@media (max-width: 768px) {
    .sidebar { display: none; }
    body { overflow-y: auto; }
    .card { padding: 20px; border-radius: 0; width: 100%; height: 100vh; }
}