:root {
    --bg-color: #0d1117;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent-yellow: #f1e05a;
    --accent-yellow-glow: rgba(241, 224, 90, 0.4);
    --accent-blue: #58a6ff;
    --accent-green: #238636;
    --accent-red: #da3633;
    --glass-bg: rgba(22, 27, 34, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-main: 'Outfit', sans-serif;
    --border-radius: 16px;
    --blob-1: #58a6ff;
    --blob-2: #f1e05a;
    --blob-3: #8957e5;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Background Effects */
#noise-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 100;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
    animation: move 20s infinite alternate;
}

.blob-1 { width: 500px; height: 500px; background: var(--blob-1); top: -10%; left: -10%; animation-delay: 0s; }
.blob-2 { width: 400px; height: 400px; background: var(--blob-2); bottom: -10%; right: -10%; animation-delay: -5s; }
.blob-3 { width: 600px; height: 600px; background: var(--blob-3); top: 40%; left: 40%; animation-delay: -10s; }

@keyframes move {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.1); }
}

/* Typography */
h1 { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1rem; background: -webkit-linear-gradient(45deg, var(--text-primary), var(--accent-blue)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
h2 { font-size: 2.2rem; font-weight: 600; margin-bottom: 1rem; color: var(--text-primary); }
p { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 1.5rem; }

/* Layout & Glassmorphism container */
#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.view {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    background: var(--text-primary);
    color: var(--bg-color);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--text-primary);
}

.btn-primary { background: var(--accent-blue); color: #fff; }
.btn-primary:hover { box-shadow: 0 10px 20px -10px var(--accent-blue); }

.btn-secondary { background: transparent; border: 1px solid var(--text-primary); color: var(--text-primary); }
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); box-shadow: none; }

/* Hotspot Diagram Layout */
.equipment-view { display: flex; gap: 3rem; align-items: stretch; margin-top: 2rem;}
.equipment-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.equipment-diagram-container {
    flex: 1.2;
    position: relative;
    background: rgba(255, 255, 255, 0.85); /* Slightly darker white for contrast with white generated imgs */
    border-radius: var(--border-radius);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

.equipment-diagram-container img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    mix-blend-mode: multiply; /* Removes the white background if it's pure white */
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

/* Hotspots */
.hotspot {
    position: absolute;
    width: 24px;
    height: 24px;
    background: var(--accent-yellow);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(241, 224, 90, 0.7);
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
    z-index: 10;
}

.hotspot:hover, .hotspot.active {
    transform: translate(-50%, -50%) scale(1.3);
    background: #fff;
    z-index: 30;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(241, 224, 90, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(241, 224, 90, 0); }
    100% { box-shadow: 0 0 0 0 rgba(241, 224, 90, 0); }
}

.hotspot-tooltip {
    position: absolute;
    background: var(--bg-color);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    font-size: 0.9rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
    z-index: 20;
    width: max-content;
    max-width: 250px;
    box-shadow: var(--glass-shadow);
}
.hotspot-tooltip strong { display: block; color: var(--accent-yellow); margin-bottom: 0.3rem; font-size: 1.1rem;}

.hotspot:hover .hotspot-tooltip, .hotspot.active .hotspot-tooltip {
    opacity: 1;
    transform: translateY(-20px) translateX(-50%);
    left: 50%;
    bottom: 100%;
}

.info-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.info-card { background: rgba(0,0,0,0.2); padding: 1.5rem; border-radius: 12px; border: 1px solid var(--glass-border); }
.info-card h3 { color: var(--accent-blue); margin-bottom: 0.5rem; font-size: 1.1rem; }
.info-card p { font-size: 0.95rem; margin-bottom: 0; }

.bottom-nav { margin-top: 2rem; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--glass-border); padding-top: 1.5rem; }
.progress-dots { display: flex; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-secondary); transition: all 0.3s; opacity: 0.5; }
.dot.active { background: var(--accent-blue); width: 20px; border-radius: 10px; opacity: 1; }

/* Quiz Styling */
.quiz-container { max-width: 800px; margin: 0 auto; text-align: center; }
.question-count { color: var(--accent-blue); font-weight: 600; margin-bottom: 1rem; display: inline-block; padding: 0.4rem 1rem; background: rgba(88, 166, 255, 0.1); border-radius: 20px; }
.quiz-question { font-size: 1.8rem; margin-bottom: 2rem; font-weight: 600; }
.quiz-options { display: flex; flex-direction: column; gap: 1rem; max-width: 500px; margin: 0 auto 2rem auto; }
.quiz-option {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    color: var(--text-primary);
}
.quiz-option:hover { background: rgba(255,255,255,0.1); transform: translateX(5px); }
.quiz-option.selected { background: rgba(88, 166, 255, 0.2); border-color: var(--accent-blue); }
.quiz-option.correct { background: rgba(35, 134, 54, 0.2); border-color: var(--accent-green); }
.quiz-option.incorrect { background: rgba(218, 54, 51, 0.2); border-color: var(--accent-red); }

.feedback-area { min-height: 60px; margin-bottom: 1rem; display: flex; align-items: center; justify-content: center; }
.feedback-msg { font-size: 1.2rem; font-weight: 600; opacity: 0; transform: translateY(10px); transition: all 0.3s; }
.feedback-msg.show { opacity: 1; transform: translateY(0); }
.feedback-msg.success { color: var(--accent-green); }
.feedback-msg.error { color: var(--accent-red); }

/* Results Screen */
.results-container { text-align: center; padding: 4rem 2rem; }
.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 2rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    font-weight: 800;
    position: relative;
    background: conic-gradient(var(--accent-green) calc(var(--score-pct) * 1%), rgba(255,255,255,0.1) 0);
}
.score-circle::before {
    content: '';
    position: absolute;
    inset: 15px;
    background: var(--bg-color);
    border-radius: 50%;
    z-index: 1;
}
.score-text { position: relative; z-index: 2; display: flex; flex-direction: column; line-height: 1; }
.score-text span { font-size: 1.2rem; color: var(--text-secondary); margin-top: 5px; font-weight: 400; }

.pass-state .score-circle { background: conic-gradient(var(--accent-green) calc(var(--score-pct) * 1%), rgba(255,255,255,0.1) 0); box-shadow: 0 0 40px rgba(35, 134, 54, 0.3); }
.fail-state .score-circle { background: conic-gradient(var(--accent-red) calc(var(--score-pct) * 1%), rgba(255,255,255,0.1) 0); box-shadow: 0 0 40px rgba(218, 54, 51, 0.3); }

.result-msg { font-size: 1.5rem; margin-bottom: 2rem; max-width: 600px; margin: 0 auto 2.5rem auto; }
.pass-state .result-msg { color: var(--accent-green); }
.fail-state .result-msg { color: var(--accent-red); }

@media (max-width: 900px) {
    .equipment-view { flex-direction: column; }
    .equipment-diagram-container { min-height: 300px; }
    .info-cards { grid-template-columns: 1fr; }
    .deep-dive-grid { grid-template-columns: 1fr !important; }
}

/* New Module Separation Layouts */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.menu-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-10px);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5);
    border-color: var(--accent-blue);
}

.features-card li { display: flex; align-items: flex-start; gap: 1rem; font-size: 1.1rem; }
.feature-icon { flex-shrink: 0; margin-top: 4px; }

/* Status Badges */
.status-badge {
    margin-top: auto;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.status-passed {
    background: rgba(35, 134, 54, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(35, 134, 54, 0.5);
}
.status-failed {
    background: rgba(218, 54, 51, 0.2);
    color: var(--accent-red);
    border: 1px solid rgba(218, 54, 51, 0.5);
}
.status-not-taken {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}
