/* genpatsu.quest - Isometric Quest-Based Educational Experience */

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

:root {
    --orange: #e8a435;
    --teal: #5b8fa8;
    --sage: #8fae8b;
    --dark: #2c2c34;
    --light: #e8e4dc;
    --slate: #5a6275;
    --red: #c44536;
    --green: #2a9d8f;
    --bg-alt: #363640;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Nunito', sans-serif;
    background: var(--dark);
    color: var(--light);
}

.viewport {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header/HUD */
.hud {
    background: var(--dark);
    border-bottom: 2px solid var(--slate);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    z-index: 100;
}

.hud-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.title {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--orange);
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.level-display {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: var(--green);
    letter-spacing: 1px;
    padding: 4px 8px;
    border: 1px solid var(--green);
    background: rgba(42, 157, 143, 0.1);
}

.hud-center {
    flex: 1;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--bg-alt);
    border: 1px solid var(--slate);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--teal));
    transition: width 0.3s ease;
}

.progress-text {
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    letter-spacing: 0.5px;
    color: var(--slate);
    text-transform: uppercase;
}

.hud-right {
    display: flex;
    gap: 20px;
}

.stat {
    text-align: center;
    font-family: 'Space Mono', monospace;
    font-size: 9px;
    color: var(--slate);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat span {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--light);
    margin-top: 2px;
}

/* Main Content */
.main-container {
    flex: 1;
    display: flex;
    gap: 0;
    overflow: hidden;
}

.map-container {
    flex: 1;
    position: relative;
    background: linear-gradient(135deg, #2c2c34 0%, #363640 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.isometric-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.isometric-map {
    width: 90%;
    height: 90%;
    max-width: 900px;
    max-height: 700px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
}

/* Zones */
.zone {
    cursor: pointer;
    transition: all 0.2s ease;
}

.zone:hover {
    filter: brightness(1.2);
}

.zone:hover .pulse {
    animation: glow 0.8s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        r: 45px;
        opacity: 0.15;
    }
    50% {
        r: 60px;
        opacity: 0.05;
    }
}

/* Zone Tooltip */
.zone-tooltip {
    position: absolute;
    background: rgba(44, 44, 52, 0.95);
    border: 1px solid var(--slate);
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    color: var(--orange);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 50;
    white-space: nowrap;
}

.zone-tooltip.visible {
    opacity: 1;
}

.tooltip-name {
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.tooltip-quest {
    font-size: 6px;
    color: var(--green);
}

/* Bento Sidebar */
.bento-sidebar {
    width: 30%;
    background: var(--dark);
    border-left: 2px solid var(--slate);
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bento-panel {
    background: var(--bg-alt);
    border: 1px solid var(--slate);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.bento-panel.active-panel {
    border: 2px solid var(--green);
    box-shadow: 0 0 12px rgba(42, 157, 143, 0.2);
}

.panel-header {
    font-family: 'Press Start 2P', cursive;
    font-size: 7px;
    letter-spacing: 1px;
    color: var(--orange);
    background: rgba(232, 164, 53, 0.1);
    padding: 8px 12px;
    border-bottom: 1px solid var(--slate);
    text-transform: uppercase;
}

.panel-content {
    padding: 12px;
}

#questTitle {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    color: var(--light);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.quest-badge {
    width: 48px;
    height: 48px;
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-icon {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

#questDescription {
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    line-height: 1.6;
    color: var(--slate);
    margin-bottom: 12px;
}

.quest-objective {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 8px;
}

.obj-item {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    color: var(--light);
    padding: 4px 0;
    padding-left: 16px;
    position: relative;
}

.obj-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
}

/* Achievements */
.achievement {
    display: flex;
    gap: 8px;
    padding: 8px;
    margin-bottom: 6px;
    background: rgba(0,0,0,0.2);
    border-radius: 2px;
    border-left: 3px solid var(--slate);
}

.achievement.achieved {
    border-left-color: var(--green);
    background: rgba(42, 157, 143, 0.1);
}

.ach-icon {
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
}

.achievement:not(.achieved) .ach-icon {
    color: var(--slate);
}

.ach-text {
    flex: 1;
    min-width: 0;
}

.ach-name {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--light);
}

.ach-desc {
    font-family: 'Nunito', sans-serif;
    font-size: 9px;
    color: var(--slate);
    margin-top: 2px;
}

/* Stats Panel */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-family: 'Space Mono', monospace;
    font-size: 11px;
}

.stat-label {
    color: var(--slate);
}

.stat-value {
    color: var(--light);
    font-weight: 600;
}

/* Learning Path */
.learning-path {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.path-step {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border-radius: 2px;
    background: rgba(0,0,0,0.2);
    transition: all 0.2s ease;
}

.path-step.completed {
    background: rgba(42, 157, 143, 0.15);
    border-left: 3px solid var(--green);
}

.path-step.active {
    background: rgba(232, 164, 53, 0.15);
    border-left: 3px solid var(--orange);
}

.step-num {
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate);
    color: var(--dark);
    flex-shrink: 0;
    border-radius: 2px;
}

.path-step.completed .step-num {
    background: var(--green);
    color: var(--light);
}

.path-step.active .step-num {
    background: var(--orange);
    color: var(--dark);
}

.step-text {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    color: var(--light);
}

/* Scrollbar styling */
.bento-sidebar::-webkit-scrollbar {
    width: 6px;
}

.bento-sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}

.bento-sidebar::-webkit-scrollbar-thumb {
    background: var(--slate);
    border-radius: 3px;
}

.bento-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--teal);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .bento-sidebar {
        width: 35%;
    }

    .isometric-map {
        width: 95%;
        height: 95%;
    }
}

@media (max-width: 768px) {
    .hud {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px;
    }

    .hud-center {
        max-width: none;
        flex-basis: 100%;
        order: 3;
    }

    .main-container {
        flex-direction: column;
    }

    .map-container {
        flex: 1;
        min-height: 300px;
    }

    .bento-sidebar {
        width: 100%;
        max-height: 300px;
        border-left: none;
        border-top: 2px solid var(--slate);
        padding: 12px;
        gap: 8px;
    }

    .bento-panel {
        min-height: auto;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.bento-panel {
    animation: fadeIn 0.3s ease;
}

/* Print-friendly */
@media print {
    .hud, .bento-sidebar {
        display: none;
    }
}
