/* Bram and the Quest of the Holy Sausage - Styles */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

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

body {
    background: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'VT323', monospace;
    overflow: hidden;
}

#game-container {
    width: 800px;
    height: 600px;
    background: #0f0f23;
    border: 4px solid #4a4a6a;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(100, 100, 200, 0.3);
    position: relative;
    overflow: hidden;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Title Screen */
#title-screen {
    background: linear-gradient(180deg, #2d1b4e 0%, #1a1a2e 50%, #0d0d1a 100%);
    text-align: center;
    color: #ffd700;
}

#title-screen h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 2.5rem;
    text-shadow: 3px 3px 0 #8b4513, 6px 6px 0 #000;
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}

#title-screen h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1rem;
    color: #daa520;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.5rem;
    color: #888;
    margin-bottom: 20px;
}

.pug-ascii {
    color: #d2b48c;
    font-family: monospace;
    margin: 20px 0;
}

.pug-ascii pre {
    font-size: 1rem;
    line-height: 1.2;
}

.tagline {
    font-style: italic;
    color: #9370db;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

@keyframes glow {
    from {
        text-shadow: 3px 3px 0 #8b4513, 6px 6px 0 #000, 0 0 10px #ffd700;
    }
    to {
        text-shadow: 3px 3px 0 #8b4513, 6px 6px 0 #000, 0 0 30px #ffd700, 0 0 50px #daa520;
    }
}

.game-btn {
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8rem;
    padding: 15px 30px;
    margin: 10px;
    background: linear-gradient(180deg, #4a3c6e 0%, #2d2450 100%);
    color: #ffd700;
    border: 3px solid #6a5a8e;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.game-btn:hover {
    background: linear-gradient(180deg, #6a5a8e 0%, #4a3c6e 100%);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

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

/* Game Screen */
#game-screen {
    display: none;
    flex-direction: column;
    background: #000;
}

#game-screen.active {
    display: flex;
}

#menu-bar {
    display: flex;
    justify-content: space-around;
    background: linear-gradient(180deg, #3d3d5c 0%, #2a2a40 100%);
    padding: 8px;
    border-bottom: 2px solid #5a5a7a;
}

.menu-item {
    font-family: 'VT323', monospace;
    font-size: 1.2rem;
    color: #ccc;
    cursor: pointer;
    padding: 5px 15px;
    border-radius: 3px;
    transition: all 0.2s;
}

.menu-item:hover {
    background: #4a4a6a;
    color: #fff;
}

.menu-item.active {
    background: #5a5a8a;
    color: #ffd700;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

#game-canvas {
    display: block;
    background: #2a4a3a;
    image-rendering: pixelated;
    cursor: crosshair;
}

#text-box {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1f 100%);
    padding: 15px 20px;
    border-top: 2px solid #4a4a6a;
    min-height: 80px;
}

#game-text {
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    color: #e0e0e0;
    line-height: 1.4;
}

/* Inventory Panel */
#inventory-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, #2d2d4a 0%, #1a1a30 100%);
    border: 3px solid #5a5a8a;
    border-radius: 10px;
    padding: 20px;
    min-width: 400px;
    z-index: 100;
}

#inventory-panel h3 {
    color: #ffd700;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

#inventory-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.inventory-slot {
    width: 70px;
    height: 70px;
    background: #1a1a2e;
    border: 2px solid #4a4a6a;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.inventory-slot:hover {
    background: #2a2a4a;
    border-color: #ffd700;
}

.inventory-slot.selected {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Dialog Box */
#dialog-box {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #2d2d4a 0%, #1a1a30 100%);
    border: 3px solid #5a5a8a;
    border-radius: 10px;
    padding: 20px;
    width: 700px;
    display: flex;
    gap: 20px;
    z-index: 100;
}

#dialog-portrait {
    width: 80px;
    height: 80px;
    background: #1a1a2e;
    border: 2px solid #4a4a6a;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

#dialog-content {
    flex: 1;
}

#dialog-text {
    color: #e0e0e0;
    font-size: 1.3rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

#dialog-choices {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dialog-choice {
    background: #3a3a5a;
    padding: 8px 15px;
    border-radius: 5px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.2s;
}

.dialog-choice:hover {
    background: #4a4a7a;
    color: #ffd700;
}

/* Credits Screen */
#credits-screen {
    background: linear-gradient(180deg, #1a1a2e 0%, #0f0f1f 100%);
    text-align: center;
    color: #ccc;
}

#credits-screen h2 {
    font-family: 'Press Start 2P', cursive;
    color: #ffd700;
    margin-bottom: 30px;
}

#credits-screen p {
    font-size: 1.5rem;
    margin: 15px 0;
}

.hidden {
    display: none !important;
}

/* Cursor styles */
.cursor-walk {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text y="24" font-size="24">👣</text></svg>') 16 16, auto;
}

.cursor-look {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text y="24" font-size="24">👁️</text></svg>') 16 16, auto;
}

.cursor-use {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text y="24" font-size="24">✋</text></svg>') 16 16, auto;
}

.cursor-talk {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><text y="24" font-size="24">💬</text></svg>') 16 16, auto;
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.bounce {
    animation: bounce 0.5s ease-in-out;
}

/* Scene transitions */
.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
