:root {
    --primary-accent: #f9c1c1;
    --primary-accent-hover: #d13b3b;
    --text-dark: #000;
    --text-light: #fff;
    --border-color: #000;
    --correct-color: #008000;
    --incorrect-color: #d13b3b;
}

/* --- Global Setup & Ukiyo-e Canvas --- */
#ukiyo-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

body {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    margin: 0;
    padding: 0 0 150px 0; /* Add padding to bottom to avoid footer overlap */
    background: url('https://raw.githubusercontent.com/KABURAKURIA/BACKGROUND-ASSETS/main/visuals/bg%20image.jpeg') no-repeat center center fixed;
    background-size: cover;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* --- Reusable Components & Styles --- */

/* General Animation */
.animated-component {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUpFadeIn 0.8s ease-out forwards;
}

@keyframes slideUpFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glassmorphism + Neobrutalism Card Style */
.glass-brutalist-card {
    background-color: rgba(255, 255, 255, 0.4); /* Increased opacity for better visibility */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 3px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 8px 8px 0px rgba(0,0,0,0.9);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
}

/* 3D Skeuomorphic/Brutalist Buttons */
.btn-3d {
    background-color: var(--primary-accent);
    color: var(--text-dark);
    border: 3px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    font-family: 'IBM Plex Mono', monospace;
    text-decoration: none;
    display: inline-block;
    box-shadow: 4px 4px 0px var(--border-color);
    transition: transform 0.1s linear, box-shadow 0.1s linear, background-color 0.2s;
}
.btn-3d:hover {
    background-color: var(--primary-accent-hover);
    color: var(--text-light);
}
.btn-3d:active {
    transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px var(--border-color);
}
.btn-3d:disabled {
    background-color: #ccc;
    color: #888;
    box-shadow: 4px 4px 0px #888;
    cursor: not-allowed;
}

/* --- Header & Drawer --- */
.header {
    color: var(--text-light);
    text-align: center;
    padding: 20px;
    margin: 100px 20px 0 20px;
    position: relative;
    z-index: 1;
    background-color: rgba(58, 58, 58, 0.2);
    border-bottom: 8px solid var(--text-light);
}
.drawer {
    height: 100%;
    width: 250px;
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-100%);
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 3px solid var(--border-color);
    box-shadow: 5px 0 15px rgba(0,0,0,0.2);
    overflow-x: hidden;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding-top: 60px;
    z-index: 10;
}
.drawer.is-open {
    transform: translateX(0);
}
.drawer a {
    padding: 15px 20px;
    text-decoration: none;
    font-size: 1.1em;
    color: var(--text-light);
    display: block;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: bold;
}
.drawer a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(10px);
}
.drawer-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 36px;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}
.drawer-close:hover {
    transform: rotate(90deg);
}
.drawer-toggle {
    font-size: 24px;
    color: var(--text-dark);
    background-color: var(--primary-accent);
    border: 3px solid var(--border-color);
    cursor: pointer;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 11;
    padding: 5px 10px;
    border-radius: 8px;
    box-shadow: 4px 4px 0px var(--border-color);
    transition: transform 0.1s linear, box-shadow 0.1s linear;
}
.drawer-toggle:active {
     transform: translate(4px, 4px);
    box-shadow: 0px 0px 0px var(--border-color);
}

/* --- Quiz Specific Styles --- */
.quiz-container {
    text-align: center;
}
.question {
    text-align: left;
    margin-bottom: 40px;
    padding: 20px;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    /* Using new animation here */
    animation: scaleUpPopIn 0.6s ease-out forwards;
}

/* New Staggered Pop-in Animation */
.question:nth-child(1) { animation-delay: 0.2s; }
.question:nth-child(2) { animation-delay: 0.3s; }
.question:nth-child(3) { animation-delay: 0.4s; }
.question:nth-child(4) { animation-delay: 0.5s; }
.question:nth-child(5) { animation-delay: 0.6s; }
.question:nth-child(6) { animation-delay: 0.7s; }
.question:nth-child(7) { animation-delay: 0.8s; }
.question:nth-child(8) { animation-delay: 0.9s; }
.question:nth-child(9) { animation-delay: 1.0s; }
.question:nth-child(10){ animation-delay: 1.1s; }

@keyframes scaleUpPopIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.question h3 {
    margin: 0 0 20px;
    font-size: 1.4em;
}
.options-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.options-list li {
    margin-bottom: 10px;
}
/* Custom Radio Button */
.options-list input[type="radio"] {
    opacity: 0;
    position: fixed;
    width: 0;
}
.options-list label {
    display: inline-block;
    background-color: #fff;
    padding: 10px 15px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 95%;
    position: relative;
}
.options-list input[type="radio"]:checked + label {
    background-color: var(--primary-accent);
    font-weight: bold;
    box-shadow: 2px 2px 0px var(--border-color);
    transform: translate(-2px, -2px);
}
.options-list input[type="radio"]:focus + label {
     outline: 2px dashed var(--primary-accent-hover);
}

/* Result styling */
.quiz-submitted .options-list label {
    cursor: not-allowed;
}
.quiz-submitted .correct-answer {
    background-color: #d4edda; /* Light green */
    border-color: var(--correct-color);
    font-weight: bold;
}
.quiz-submitted .user-incorrect {
    background-color: #f8d7da; /* Light red */
    border: 3px solid var(--incorrect-color);
    font-weight: bold;
}

#result-display {
    margin-top: 40px;
    font-size: 1.5em;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.5s;
}
#result-display.visible {
    opacity: 1;
}

/* --- Footer --- */
.footer {
    text-align: center;
}
.footer p { margin-bottom: 15px; }
