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

body {
    font-family: monospace;
    background: linear-gradient(to bottom, #312e81, #581c87, #9f1239);
    min-height: 100vh;
    color: white;
    overflow-x: hidden;
}

.hidden {
    display: none !important;
}

.pixel-text {
    font-family: 'Press Start 2P', monospace;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

.pixel-btn {
    font-family: 'Press Start 2P', monospace;
    padding: 12px 24px;
    background: #facc15;
    color: #1f2937;
    border: none;
    cursor: pointer;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    transition: transform 0.2s;
}

.pixel-btn:hover {
    transform: scale(1.05);
    background: #fde047;
}

.pixel-btn.big {
    padding: 16px 32px;
    font-size: 14px;
}

.center {
    text-align: center;
}

/* Money Counter */
#money-counter {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: #facc15;
    padding: 12px 16px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    color: #1f2937;
}

/* Day Counter */
#day-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: #7c3aed;
    padding: 12px 16px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
}

/* Screens */
.screen {
    display: none;
    min-height: 100vh;
    padding: 40px 20px;
}

.screen.active {
    display: block;
}

/* Entrance */
#entrance-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.entrance-content {
    text-align: center;
    margin-bottom: 60px;
}

#museum-title {
    font-size: 48px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

#museum-title:hover {
    transform: scale(1.05);
}

.subtitle {
    color: #c4b5fd;
    font-size: 14px;
}

.museum-building {
    position: relative;
    margin-bottom: 120px;
}

.roof {
    width: 0;
    height: 0;
    border-left: 180px solid transparent;
    border-right: 180px solid transparent;
    border-bottom: 80px solid #b91c1c;
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
}

.building {
    width: 320px;
    height: 256px;
    background: #fef3c7;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    position: relative;
}

.window {
    width: 64px;
    height: 64px;
    background: #bae6fd;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    position: absolute;
    top: 32px;
}

.window.left {
    left: 32px;
}

.window.right {
    right: 32px;
}

.door {
    width: 96px;
    height: 128px;
    background: linear-gradient(to bottom, #92400e, #78350f);
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.sign {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: #92400e;
    padding: 12px 24px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    font-family: 'Press Start 2P', monospace;
    font-size: 10px;
    text-align: center;
    line-height: 1.5;
}

.bounce-arrow {
    font-size: 32px;
    animation: bounce 2s ease-in-out infinite;
}

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

/* Lobby */
.lobby-content {
    max-width: 1200px;
    margin: 0 auto;
}

.lobby-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.plant-container {
    position: relative;
}

.task-btn {
    position: absolute;
    bottom: -40px;
    left: 0;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.task-btn:hover {
    background: #60a5fa;
}

.cashier-area {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 40px;
}

.cashier {
    position: absolute;
    top: -160px;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    transition: transform 0.2s;
}

.cashier:hover {
    transform: translateX(-50%) scale(1.05);
}

.counter {
    width: 100%;
    height: 192px;
    background: #92400e;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    position: relative;
}

.counter::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
    background: #78350f;
}

.ticket {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 64px;
    animation: pulse 1s ease-in-out infinite;
}

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

.task-container {
    text-align: center;
    margin-bottom: 20px;
}

.trash-icon {
    font-size: 48px;
}

.painting-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.painting-frame {
    background: #92400e;
    padding: 8px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    transition: transform 0.3s;
}

.painting-frame.crooked {
    transform: rotate(12deg);
}

.painting {
    background: #bfdbfe;
    width: 128px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.lobby-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

/* Exhibition */
#exhibition-content {
    height: 100vh;
    overflow-y: auto;
    padding-top: 80px;
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: #1f2937;
    z-index: 999;
}

.progress-fill {
    height: 100%;
    background: #facc15;
    width: 0%;
    transition: width 0.3s;
}

.exhibition-header {
    text-align: center;
    margin-bottom: 80px;
    background: rgba(0,0,0,0.5);
    padding: 24px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    display: inline-block;
    margin-left: 50%;
    transform: translateX(-50%);
}

#exhibition-title {
    font-size: 40px;
    margin-bottom: 12px;
}

.section {
    margin-bottom: 80px;
    animation: fadeIn 0.8s ease-out;
}

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

.section.left {
    animation: slideInLeft 0.8s ease-out;
    margin-right: auto;
    max-width: 80%;
}

.section.right {
    animation: slideInRight 0.8s ease-out;
    margin-left: auto;
    max-width: 80%;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.section-content {
    background: rgba(255,255,255,0.95);
    padding: 32px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    color: #1f2937;
}

.section-text {
    font-size: 20px;
    line-height: 1.8;
}

.spacer {
    height: 400px;
}

.visitor-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 900;
    cursor: pointer;
    animation: fadeIn 0.5s ease-out;
}

.visitor:hover {
    transform: scale(1.1);
}

.cat-container {
    position: fixed;
    bottom: 80px;
    z-index: 900;
    transition: left 0.05s linear;
}

.exhibition-end {
    text-align: center;
    margin: 80px 0;
}

.end-box {
    background: rgba(0,0,0,0.7);
    padding: 40px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    display: inline-block;
}

.end-title {
    font-size: 32px;
    margin-bottom: 24px;
}

.end-stats {
    color: #c4b5fd;
    margin-bottom: 32px;
    font-size: 14px;
    line-height: 1.8;
}

.end-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Gift Shop */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
}

.shop-item {
    background: white;
    padding: 24px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    text-align: center;
    color: #1f2937;
}

.shop-item-emoji {
    font-size: 64px;
    margin-bottom: 16px;
}

.shop-item-name {
    font-weight: bold;
    margin-bottom: 12px;
}

.shop-item-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.shop-item-btn:hover {
    background: #34d399;
}

/* Dialogue Box */
.dialogue-box {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.95);
    padding: 32px;
    z-index: 1000;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
}

#dialogue-text {
    font-size: 18px;
    margin-bottom: 24px;
    line-height: 1.6;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.dialogue-choices {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

.choice-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    cursor: pointer;
}

.choice-btn:hover {
    background: #60a5fa;
}

.dialogue-btn {
    background: white;
    color: black;
    border: none;
    padding: 12px 24px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    cursor: pointer;
    display: block;
    margin: 0 auto;
}

.dialogue-btn:hover {
    background: #e5e7eb;
}

/* Inventory Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    color: #1f2937;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.modal-header h3 {
    font-size: 24px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
}

.close-btn:hover {
    background: #e5e7eb;
    border-radius: 4px;
}

.friends-grid,
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.friend-card,
.item-card {
    background: #f3f4f6;
    padding: 16px;
    box-shadow: 0 -4px 0 0 rgba(0,0,0,0.3), 0 4px 0 0 rgba(255,255,255,0.3), -4px 0 0 0 rgba(0,0,0,0.3), 4px 0 0 0 rgba(255,255,255,0.3);
    text-align: center;
}

.friend-card {
    background: #e9d5ff;
}

.item-emoji {
    font-size: 48px;
    margin-bottom: 8px;
}

.item-name,
.friend-name {
    font-weight: bold;
    font-size: 12px;
    margin-top: 8px;
}

.item-from {
    font-size: 10px;
    color: #6b7280;
    margin-top: 4px;
}

.empty-text {
    text-align: center;
    color: #6b7280;
    font-style: italic;
}

h4 {
    margin-bottom: 16px;
    font-size: 18px;
}