/* === PAC-MAN CV GAME === */

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

:root {
    --neon-cyan: #00ffff;
    --neon-magenta: #ff00ff;
    --neon-green: #00ff41;
    --neon-yellow: #ffff00;
    --neon-red: #ff0040;
    --neon-blue: #0080ff;
    --dark-bg: #0a0a14;
    --panel-bg: rgba(10, 10, 20, 0.92);
    --font-pixel: 'Press Start 2P', monospace;
}

body {
    background: var(--dark-bg);
    overflow: hidden;
    font-family: var(--font-pixel);
    width: 100vw;
    height: 100vh;
    cursor: crosshair;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* UI Overlay */
#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

#ui-overlay > * {
    pointer-events: auto;
}

.hidden {
    display: none !important;
}

/* HUD */
#hud {
    position: fixed;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 20;
    pointer-events: none;
}

#hud-level {
    font-size: 10px;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan), 0 0 16px var(--neon-cyan);
    background: var(--panel-bg);
    padding: 8px 14px;
    border: 2px solid var(--neon-cyan);
    border-radius: 2px;
}

#hud-score {
    font-size: 14px;
    color: var(--neon-yellow);
    text-shadow: 0 0 8px var(--neon-yellow), 0 0 16px var(--neon-yellow);
    background: var(--panel-bg);
    padding: 8px 14px;
    border: 2px solid var(--neon-yellow);
    border-radius: 2px;
}

#hud-lives {
    font-size: 14px;
    color: var(--neon-red);
    text-shadow: 0 0 8px var(--neon-red);
    background: var(--panel-bg);
    padding: 8px 14px;
    border: 2px solid var(--neon-red);
    border-radius: 2px;
}

.hud-btn {
    pointer-events: auto;
    font-family: var(--font-pixel);
    font-size: 16px;
    padding: 8px 12px;
    background: var(--panel-bg);
    border: 2px solid var(--neon-magenta);
    color: var(--neon-magenta);
    cursor: pointer;
    text-shadow: 0 0 6px var(--neon-magenta);
    transition: all 0.15s;
}

.hud-btn:hover {
    background: var(--neon-magenta);
    color: var(--dark-bg);
    box-shadow: 0 0 15px var(--neon-magenta);
}

.hud-btn.muted {
    color: #444;
    border-color: #444;
    text-shadow: none;
}

/* Overlay Screens */
.overlay-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 15, 0.85);
    z-index: 30;
}

.title-glow {
    font-size: 22px;
    color: var(--neon-cyan);
    text-align: center;
    line-height: 1.8;
    text-shadow:
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-magenta);
    animation: titlePulse 3s ease-in-out infinite alternate;
    margin-bottom: 15px;
}

@keyframes titlePulse {
    from { text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px var(--neon-cyan); }
    to { text-shadow: 0 0 15px var(--neon-cyan), 0 0 30px var(--neon-cyan), 0 0 50px var(--neon-magenta); }
}

.subtitle {
    font-size: 9px;
    color: #666;
    margin-bottom: 20px;
}

/* Legend */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 30px;
    max-width: 500px;
}

.legend-item {
    font-size: 7px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot-sample {
    width: 8px;
    height: 8px;
    background: var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--neon-cyan);
}

.ghost-sample {
    width: 12px;
    height: 12px;
    border-radius: 50% 50% 0 0;
}

.ghost-sample.green { background: var(--neon-green); box-shadow: 0 0 6px var(--neon-green); }
.ghost-sample.purple { background: var(--neon-magenta); box-shadow: 0 0 6px var(--neon-magenta); }
.ghost-sample.cyan { background: var(--neon-cyan); box-shadow: 0 0 6px var(--neon-cyan); }
.ghost-sample.yellow { background: var(--neon-yellow); box-shadow: 0 0 6px var(--neon-yellow); }

.question-sample {
    width: 12px;
    height: 12px;
    background: var(--neon-yellow);
    color: var(--dark-bg);
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Pixel Button */
.pixel-btn {
    font-family: var(--font-pixel);
    font-size: 13px;
    padding: 14px 28px;
    border: 2px solid var(--neon-green);
    background: transparent;
    color: var(--neon-green);
    cursor: pointer;
    text-transform: uppercase;
    text-shadow: 0 0 6px var(--neon-green);
    transition: all 0.15s;
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

.pixel-btn:hover {
    background: var(--neon-green);
    color: var(--dark-bg);
    text-shadow: none;
    box-shadow: 0 0 20px var(--neon-green), 0 0 40px var(--neon-green);
    transform: scale(1.05);
}

.pixel-btn:active {
    transform: scale(0.95);
}

.pulse {
    animation: btnPulse 1.5s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(0, 255, 65, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 65, 0.6), 0 0 40px rgba(0, 255, 65, 0.3); }
}

.hint {
    font-size: 7px;
    color: #444;
    margin-top: 18px;
    animation: blink 1.5s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Milestone Overlay */
#milestone-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 15, 0.88);
    z-index: 40;
}

#milestone-box {
    background: var(--panel-bg);
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.4);
    padding: 35px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    animation: milestoneAppear 0.5s ease-out;
}

@keyframes milestoneAppear {
    0% { opacity: 0; transform: scale(0.5) rotate(-5deg); }
    60% { transform: scale(1.05) rotate(1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

#milestone-type {
    font-size: 10px;
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
    margin-bottom: 15px;
    text-transform: uppercase;
}

#milestone-text {
    font-size: 11px;
    line-height: 2;
    color: #eee;
    margin-bottom: 20px;
}

#milestone-points {
    font-size: 24px;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow);
    animation: pointsFlash 0.6s ease-out;
    margin-bottom: 20px;
}

@keyframes pointsFlash {
    0% { opacity: 0; transform: scale(0.5); }
    50% { transform: scale(1.3); }
    100% { opacity: 1; transform: scale(1); }
}

/* Question Overlay */
#question-overlay {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 25;
    width: 90%;
    max-width: 550px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateX(-50%) translateY(30px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

#question-box {
    background: var(--panel-bg);
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3), inset 0 0 20px rgba(0, 255, 255, 0.05);
    padding: 24px;
    text-align: center;
}

#question-text {
    font-size: 11px;
    line-height: 2;
    color: #eee;
    margin-bottom: 20px;
}

#question-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.ans-btn {
    min-width: 160px;
    font-size: 15px;
    padding: 16px 24px;
    transition: all 0.15s;
}

.ans-btn.selected {
    transform: scale(1.08);
    box-shadow: 0 0 30px currentColor;
}

.yes-btn {
    border-color: var(--neon-green);
    color: var(--neon-green);
    box-shadow: 0 0 6px rgba(0, 255, 65, 0.3);
}

.yes-btn:hover, .yes-btn.selected {
    background: var(--neon-green);
    color: var(--dark-bg);
    box-shadow: 0 0 25px var(--neon-green);
}

.no-btn {
    border-color: var(--neon-red);
    color: var(--neon-red);
    box-shadow: 0 0 6px rgba(255, 0, 64, 0.3);
}

.no-btn:hover, .no-btn.selected {
    background: var(--neon-red);
    color: var(--dark-bg);
    box-shadow: 0 0 25px var(--neon-red);
}

/* Wrong Overlay */
#wrong-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 0, 64, 0.12);
    z-index: 45;
    animation: wrongFlash 0.3s ease-out;
}

@keyframes wrongFlash {
    0% { background: rgba(255, 0, 64, 0.4); }
    100% { background: rgba(255, 0, 64, 0.12); }
}

#wrong-box {
    background: var(--panel-bg);
    border: 2px solid var(--neon-red);
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.4);
    padding: 30px;
    text-align: center;
    max-width: 380px;
    width: 90%;
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.wrong-title {
    font-size: 16px;
    color: var(--neon-red);
    text-shadow: 0 0 10px var(--neon-red);
    margin-bottom: 20px;
}

.retry-btn {
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
    width: 100%;
    margin-bottom: 10px;
}

.retry-btn:hover {
    background: var(--neon-yellow);
    box-shadow: 0 0 20px var(--neon-yellow);
}

.show-btn {
    border-color: #555;
    color: #888;
    font-size: 9px;
    width: 100%;
}

.show-btn:hover {
    background: #555;
    color: #fff;
}

/* Level Complete */
#level-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 15, 0.88);
    z-index: 50;
}

#level-box {
    background: var(--panel-bg);
    border: 2px solid var(--neon-yellow);
    box-shadow: 0 0 25px rgba(255, 255, 0, 0.3);
    padding: 35px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    animation: levelAppear 0.5s ease-out;
}

@keyframes levelAppear {
    0% { opacity: 0; transform: scale(0.5) rotate(-3deg); }
    50% { transform: scale(1.08) rotate(1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

#level-box h2 {
    font-size: 16px;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow);
    margin-bottom: 15px;
}

#level-info {
    font-size: 11px;
    color: var(--neon-cyan);
    margin-bottom: 20px;
}

#level-stats {
    font-size: 12px;
    color: var(--neon-green);
    margin-bottom: 25px;
    line-height: 2.2;
}

/* Game Over */
#gameover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 15, 0.92);
    z-index: 50;
}

#gameover-box {
    background: var(--panel-bg);
    border: 2px solid var(--neon-red);
    box-shadow: 0 0 30px rgba(255, 0, 64, 0.4);
    padding: 35px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: endAppear 0.8s ease-out;
}

.gameover-title {
    font-size: 20px;
    color: var(--neon-red);
    text-shadow: 0 0 15px var(--neon-red), 0 0 30px var(--neon-red);
    margin-bottom: 20px;
}

#gameover-score {
    font-size: 14px;
    color: var(--neon-yellow);
    margin-bottom: 25px;
}

/* End Screen */
#end-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 15, 0.92);
    z-index: 50;
}

#end-box {
    background: var(--panel-bg);
    border: 2px solid var(--neon-magenta);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.3);
    padding: 35px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: endAppear 0.8s ease-out;
}

#end-box::-webkit-scrollbar {
    width: 6px;
}
#end-box::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}
#end-box::-webkit-scrollbar-thumb {
    background: var(--neon-magenta);
    border-radius: 3px;
}

@keyframes endAppear {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.end-title {
    font-size: 18px;
    color: var(--neon-magenta);
    text-shadow: 0 0 15px var(--neon-magenta), 0 0 30px var(--neon-magenta);
    margin-bottom: 20px;
}

#final-score-box {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--neon-yellow);
    padding: 18px;
    margin-bottom: 18px;
}

#final-score-box .label {
    font-size: 9px;
    color: #666;
    display: block;
    margin-bottom: 8px;
}

#final-score {
    font-size: 28px;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow);
    display: block;
}

#final-message {
    font-size: 11px;
    line-height: 2;
    color: var(--neon-cyan);
    margin-bottom: 20px;
    min-height: 35px;
}

/* CTA */
#cta-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.cta-label {
    font-size: 10px;
    color: var(--neon-cyan);
    text-shadow: 0 0 4px var(--neon-cyan);
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.5;
}

.cta-btn {
    font-size: 10px;
    text-decoration: none;
    width: 100%;
    max-width: 280px;
    text-align: center;
    padding: 10px 16px;
}

.cta-btn.linkedin {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 6px rgba(0, 128, 255, 0.3);
}

.cta-btn.linkedin:hover {
    background: var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue);
}

.cta-btn.github {
    border-color: #ccc;
    color: #ccc;
}

.cta-btn.github:hover {
    background: #ccc;
    color: var(--dark-bg);
    box-shadow: 0 0 20px #ccc;
}

.restart-btn {
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    font-size: 10px;
    box-shadow: 0 0 6px rgba(255, 0, 255, 0.3);
}

.restart-btn:hover {
    background: var(--neon-magenta);
    box-shadow: 0 0 25px var(--neon-magenta);
}

/* Learning Journal Sidebar */
#journal {
    position: fixed;
    top: 60px;
    right: 0;
    width: 280px;
    max-height: calc(100vh - 80px);
    background: var(--panel-bg);
    border-left: 2px solid var(--neon-cyan);
    box-shadow: -4px 0 20px rgba(0, 255, 255, 0.2);
    z-index: 15;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

#journal.hidden {
    transform: translateX(100%);
    display: flex !important;
}

#journal:not(.hidden) {
    transform: translateX(0);
}

#journal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    background: rgba(0, 255, 255, 0.05);
}

#journal-title {
    font-size: 8px;
    color: var(--neon-cyan);
    text-shadow: 0 0 6px var(--neon-cyan);
}

#journal-count {
    font-size: 8px;
    color: var(--neon-yellow);
    text-shadow: 0 0 6px var(--neon-yellow);
}

#journal-entries {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--neon-cyan) transparent;
}

#journal-entries::-webkit-scrollbar {
    width: 4px;
}

#journal-entries::-webkit-scrollbar-thumb {
    background: var(--neon-cyan);
    border-radius: 2px;
}

.journal-entry {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    animation: journalSlideIn 0.4s ease-out;
}

@keyframes journalSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.journal-entry-icon {
    font-size: 16px;
    margin-bottom: 4px;
}

.journal-entry-type {
    font-size: 6px;
    color: var(--neon-magenta);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.journal-entry-title {
    font-size: 7px;
    color: var(--neon-green);
    margin-bottom: 4px;
    text-shadow: 0 0 4px var(--neon-green);
}

.journal-entry-text {
    font-size: 6px;
    color: #aaa;
    line-height: 1.6;
}

.journal-entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.journal-tag {
    font-size: 5px;
    padding: 2px 5px;
    background: rgba(0, 255, 65, 0.15);
    border: 1px solid rgba(0, 255, 65, 0.3);
    color: var(--neon-green);
    border-radius: 2px;
}

#journal-toggle {
    position: fixed;
    top: 60px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: var(--panel-bg);
    border: 2px solid var(--neon-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 16;
    font-size: 16px;
    transition: all 0.2s;
}

#journal-toggle:hover {
    box-shadow: 0 0 15px var(--neon-cyan);
    transform: scale(1.1);
}

/* Milestone Card (New) */
#milestone-card {
    background: var(--panel-bg);
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.4), inset 0 0 30px rgba(0, 255, 65, 0.05);
    padding: 30px;
    text-align: center;
    max-width: 480px;
    width: 92%;
    animation: milestoneCardAppear 0.6s ease-out;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes milestoneCardAppear {
    0% { opacity: 0; transform: scale(0.3) rotate(-8deg); }
    60% { transform: scale(1.05) rotate(1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

#milestone-icon {
    font-size: 36px;
    margin-bottom: 10px;
    animation: iconBounce 0.8s ease-out;
}

@keyframes iconBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

#milestone-type-label {
    font-size: 8px;
    color: var(--neon-magenta);
    text-shadow: 0 0 6px var(--neon-magenta);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

#milestone-title {
    font-size: 14px;
    color: var(--neon-green);
    text-shadow: 0 0 8px var(--neon-green);
    margin-bottom: 15px;
    line-height: 1.6;
}

#milestone-text {
    font-size: 10px;
    line-height: 2;
    color: #ddd;
    margin-bottom: 15px;
    text-align: left;
}

#milestone-funfact {
    font-size: 9px;
    line-height: 1.8;
    color: var(--neon-yellow);
    background: rgba(255, 255, 0, 0.08);
    border: 1px solid rgba(255, 255, 0, 0.2);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 12px;
    text-align: left;
}

#milestone-funfact::before {
    content: '💡 ';
}

#milestone-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 15px;
}

.milestone-tag {
    font-size: 6px;
    padding: 4px 8px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    color: var(--neon-cyan);
    border-radius: 3px;
}

#milestone-points {
    font-size: 20px;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow);
    animation: pointsFlash 0.6s ease-out;
    margin-bottom: 15px;
}

/* Bonus Fact Overlay */
#bonus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(5, 5, 15, 0.88);
    z-index: 40;
}

#bonus-card {
    background: var(--panel-bg);
    border: 2px solid var(--neon-magenta);
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.4), inset 0 0 30px rgba(255, 0, 255, 0.05);
    padding: 30px;
    text-align: center;
    max-width: 480px;
    width: 92%;
    animation: milestoneCardAppear 0.6s ease-out;
    max-height: 85vh;
    overflow-y: auto;
}

#bonus-icon {
    font-size: 36px;
    margin-bottom: 10px;
    animation: iconBounce 0.8s ease-out;
}

#bonus-label {
    font-size: 8px;
    color: var(--neon-magenta);
    text-shadow: 0 0 6px var(--neon-magenta);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 12px;
}

#bonus-title {
    font-size: 14px;
    color: var(--neon-magenta);
    text-shadow: 0 0 8px var(--neon-magenta);
    margin-bottom: 15px;
    line-height: 1.6;
}

#bonus-text {
    font-size: 10px;
    line-height: 2;
    color: #ddd;
    margin-bottom: 15px;
    text-align: left;
}

#bonus-points {
    font-size: 20px;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow), 0 0 20px var(--neon-yellow);
    animation: pointsFlash 0.6s ease-out;
    margin-bottom: 15px;
}

/* Feedback Overlay */
#feedback-overlay {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 26;
    width: 90%;
    max-width: 500px;
    animation: slideUp 0.3s ease-out;
}

#feedback-box {
    background: var(--panel-bg);
    border: 2px solid var(--neon-green);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.3);
    padding: 20px;
    text-align: center;
}

#feedback-box.wrong {
    border-color: var(--neon-red);
    box-shadow: 0 0 20px rgba(255, 0, 64, 0.3);
}

#feedback-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

#feedback-result {
    font-size: 12px;
    margin-bottom: 10px;
    text-shadow: 0 0 6px currentColor;
}

#feedback-result.correct {
    color: var(--neon-green);
}

#feedback-result.wrong {
    color: var(--neon-red);
}

#feedback-explanation {
    font-size: 9px;
    line-height: 1.8;
    color: #ccc;
    margin-bottom: 15px;
    text-align: left;
}

/* Final Profile */
#final-profile {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: left;
    max-height: 300px;
    overflow-y: auto;
}

#final-profile h3 {
    font-size: 11px;
    color: var(--neon-cyan);
    text-shadow: 0 0 6px var(--neon-cyan);
    margin-bottom: 10px;
    text-align: center;
}

.profile-item {
    font-size: 10px;
    color: #ccc;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.6;
}

.profile-item:last-child {
    border-bottom: none;
}

.profile-item-icon {
    font-size: 12px;
    margin-right: 4px;
}

.profile-item-title {
    font-size: 11px;
    color: var(--neon-green);
    text-shadow: 0 0 4px var(--neon-green);
}

#skip-end {
    position: fixed;
    bottom: 15px;
    left: 15px;
    font-size: 9px;
    color: #555;
    text-decoration: none;
    z-index: 40;
    transition: color 0.2s;
}
#skip-end:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 6px var(--neon-cyan);
}

/* Responsive */
@media (max-width: 600px) {
    .title-glow { font-size: 16px; }
    .ans-btn { min-width: 130px; font-size: 12px; padding: 14px 18px; }
    #question-text { font-size: 9px; }
    #hud-level, #hud-score, #hud-lives { font-size: 8px; padding: 6px 10px; }
    .legend { gap: 8px; }
    .legend-item { font-size: 6px; }
}
