/* monopole.quest - Pixel-Art RPG Quest Journal */
/* Colors: #C8C8E0, #F0F0FF, #1A1A30, #2A2A48, #3A3A60, #FF6090, #60F0E0, #60E080 */
/* Fonts: Silkscreen, VT323, Press Start 2P */

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

html, body {
    width: 100%;
    height: 100%;
    background: #0A0A18;
    font-family: 'VT323', monospace;
    color: #C8C8E0;
    overflow: hidden;
}

/* Title Screen */
#title-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0A0A18;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

#title-screen.hidden {
    display: none;
}

#title-text {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(1.5rem, 4vw, 3rem);
    color: #F0F0FF;
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
    text-shadow: 0 0 10px rgba(96, 240, 224, 0.5);
}

.title-prompt {
    font-family: 'Silkscreen', monospace;
    font-size: 1rem;
    color: #60F0E0;
    animation: blink 1s step-end infinite;
}

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

/* Game Interface */
#game-interface {
    display: flex;
    width: 100%;
    height: 100vh;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#game-interface.active {
    opacity: 1;
}

/* Sidebar */
#sidebar {
    width: 280px;
    height: 100vh;
    background: #1A1A30;
    border: 4px solid #2A2A48;
    box-shadow: inset -4px -4px 0 #3A3A60, inset 4px 4px 0 #0A0A18;
    padding: 1rem;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-panel {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #2A2A48;
}

.sidebar-heading {
    font-family: 'Silkscreen', monospace;
    font-weight: 700;
    font-size: 0.9rem;
    color: #60F0E0;
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

/* Pixel Mascot */
#pixel-mascot {
    width: 64px;
    height: 64px;
    margin: 0.5rem auto;
    position: relative;
    animation: mascotBounce 1s step-end infinite;
}

.mascot-body {
    width: 48px;
    height: 48px;
    margin: 8px auto;
    background: #60F0E0;
    border-radius: 50%;
    position: relative;
    box-shadow:
        inset -8px -8px 0 #2A2A48,
        0 0 0 4px #1A1A30;
}

.mascot-body::before {
    content: 'N';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    color: #1A1A30;
}

@keyframes mascotBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.mascot-name {
    text-align: center;
    font-family: 'Silkscreen', monospace;
    font-size: 0.8rem;
    color: #F0F0FF;
    margin-top: 0.5rem;
}

.mascot-class {
    text-align: center;
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    color: #C8C8E0;
}

/* Stat Bars */
.stat-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.stat-label {
    font-family: 'Silkscreen', monospace;
    font-size: 0.7rem;
    color: #C8C8E0;
    width: 30px;
}

.pixel-bar {
    flex: 1;
    height: 12px;
    background: #0A0A18;
    border: 2px solid #3A3A60;
    position: relative;
    overflow: hidden;
}

.pixel-bar.large {
    height: 16px;
}

.pixel-fill {
    height: 100%;
    transition: width 0.5s step-end;
}

.hp-fill { background: #FF6090; }
.mp-fill { background: #60F0E0; }
.exp-fill { background: #60E080; }
.quest-fill { background: #FF80A0; }

/* Inventory */
.inventory-list {
    list-style: none;
}

.inv-item {
    font-family: 'VT323', monospace;
    font-size: 1rem;
    color: #C8C8E0;
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
}

.inv-item::before {
    content: '>';
    position: absolute;
    left: 0;
    color: #60F0E0;
}

/* Quest Journal */
#quest-journal {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 2rem;
    background: #0A0A18;
}

.journal-title {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(1rem, 2vw, 1.5rem);
    color: #F0F0FF;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0 #2A2A48;
}

/* Quest Entries */
.quest-entry {
    background: #1A1A30;
    border: 4px solid #2A2A48;
    box-shadow: inset -4px -4px 0 #3A3A60, inset 4px 4px 0 #0A0A18;
    padding: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.quest-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.quest-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.quest-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #FF6090;
    color: #0A0A18;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    font-weight: bold;
    flex-shrink: 0;
}

.completed-icon {
    background: #60E080;
}

.locked-icon {
    background: #3A3A60;
    color: #1A1A30;
}

.quest-name {
    font-family: 'Silkscreen', monospace;
    font-weight: 700;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: #F0F0FF;
    flex: 1;
}

.quest-status {
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    color: #FF6090;
    padding: 0.15rem 0.5rem;
    border: 1px solid #FF6090;
}

.quest-status.complete {
    color: #60E080;
    border-color: #60E080;
}

.quest-status.locked {
    color: #3A3A60;
    border-color: #3A3A60;
}

.quest-desc {
    font-family: 'VT323', monospace;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #C8C8E0;
    margin-bottom: 0.75rem;
}

.quest-progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.quest-progress .pixel-bar {
    flex: 1;
    max-width: 300px;
}

.progress-text {
    font-family: 'VT323', monospace;
    font-size: 0.9rem;
    color: #FF80A0;
}

.quest-reward {
    font-family: 'VT323', monospace;
    font-size: 0.95rem;
    color: #60E080;
    padding-top: 0.5rem;
    border-top: 1px dashed #2A2A48;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    #game-interface {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    #quest-journal {
        height: auto;
    }

    html, body {
        overflow: auto;
    }
}
