/* Ancleto's Coffee World - Diseño Retro Terminal */

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

body {
    font-family: 'Courier New', 'Lucida Console', monospace;
    background: #000000;
    color: #00ff00;
    height: 100vh;
    overflow: hidden;
    font-size: 14px;
    text-shadow: 0 0 5px #00ff00;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: #000000;
    color: #00ff00;
    padding: 15px;
    border-bottom: 2px solid #00ff00;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    text-shadow: 0 0 10px #00ff00;
    letter-spacing: 2px;
}

header p {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 10px;
    font-style: italic;
}

.header-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.version-info {
    font-size: 10px;
    color: #666;
    margin-left: 15px;
    opacity: 0.7;
    font-family: 'Courier New', monospace;
}

.control-btn {
    background: #000000;
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 15px;
    border-radius: 0;
    cursor: pointer;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    transition: all 0.3s ease;
    text-shadow: 0 0 5px #00ff00;
}

.control-btn:hover {
    background: #00ff00;
    color: #000000;
    text-shadow: none;
}

#resetGame {
    border-color: #ff0000;
    color: #ff0000;
    text-shadow: 0 0 5px #ff0000;
}

#resetGame:hover {
    background: #ff0000;
    color: #000000;
}

#narrative {
    background: #000000;
    border: 2px solid #00ff00;
    margin: 10px;
    padding: 10px;
    border-radius: 0;
    text-align: center;
    font-style: italic;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 10px;
    padding: 10px;
    overflow: hidden;
}

.game-section {
    background: #000000;
    border: 2px solid #00ff00;
    border-radius: 0;
    padding: 15px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.game-section:hover {
    border-color: #00ffff;
    text-shadow: 0 0 8px #00ff00;
}

.game-section h2 {
    color: #00ff00;
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
    border-bottom: 1px solid #00ff00;
    padding-bottom: 8px;
    text-shadow: 0 0 8px #00ff00;
    letter-spacing: 1px;
}

#stats {
    grid-column: 1;
    grid-row: 1;
}

#upgrades {
    grid-column: 2;
    grid-row: 1 / 3;
}

#story {
    grid-column: 3;
    grid-row: 1;
}

#actDescription {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    line-height: 1.6;
}

#actDescription h4 {
    color: #00ffff;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #00ffff;
    border-bottom: 1px solid #00ffff;
    padding-bottom: 5px;
}

#actDescription p {
    margin-bottom: 15px;
    text-align: justify;
}

#actDescription strong {
    color: #ffff00;
    text-shadow: 0 0 3px #ffff00;
}

#combat {
    grid-column: 1;
    grid-row: 2;
}

#events-achievements {
    grid-column: 3;
    grid-row: 2;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    padding: 5px 10px;
    background: #001100;
    border: 1px solid #003300;
    border-radius: 0;
    border-left: 4px solid #00ff00;
    transition: all 0.2s ease;
}

.stat-item:hover {
    background: #002200;
    border-color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
}

.stat-label {
    font-weight: bold;
    color: #00ff00;
}

.stat-value {
    color: #00ffff;
    font-weight: bold;
}

.upgrade-btn {
    width: 100%;
    background: #001100;
    color: #00ff00;
    border: 2px solid #003300;
    border-radius: 0;
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.upgrade-btn:hover {
    background: #002200;
    border-color: #00ff00;
    color: #00ffff;
    text-shadow: 0 0 8px #00ff00;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.upgrade-btn:disabled {
    background: #000000;
    color: #333333;
    border-color: #222222;
    cursor: not-allowed;
    text-shadow: none;
    box-shadow: none;
}

.upgrade-btn.disabled {
    background: #000000 !important;
    color: #333333 !important;
    border-color: #222222 !important;
    cursor: not-allowed !important;
    text-shadow: none !important;
    box-shadow: none !important;
    opacity: 0.5;
}

.boss-info {
    background: #110000;
    color: #ff0000;
    border: 2px solid #660000;
    padding: 10px;
    border-radius: 0;
    margin: 10px 0;
    text-align: center;
    text-shadow: 0 0 5px #ff0000;
}

.boss-health-bar {
    width: 100%;
    height: 10px;
    background: #330000;
    border: 1px solid #660000;
    border-radius: 0;
    overflow: hidden;
    margin: 5px 0;
}

.boss-health-fill {
    height: 100%;
    background: #ff0000;
    transition: width 0.3s ease;
    box-shadow: 0 0 5px #ff0000;
}

#console {
    background: #000000;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    padding: 15px;
    border: 2px solid #00ff00;
    border-radius: 0;
    display: none;
}

#console h2 {
    color: #00ff00;
    margin-bottom: 10px;
    text-align: center;
    text-shadow: 0 0 10px #00ff00;
}

#consoleOutput {
    height: 150px;
    overflow-y: auto;
    background: #000000;
    padding: 10px;
    border: 1px solid #00ff00;
    border-radius: 0;
    margin-bottom: 10px;
    font-size: 12px;
    color: #00ff00;
}

#consoleInput {
    width: 100%;
    background: #000000;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 10px;
    border-radius: 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

#consoleInput:focus {
    outline: none;
    box-shadow: 0 0 10px #00ff41;
}

#credits {
    background: linear-gradient(45deg, #8B4513, #D2691E);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 15px;
    margin: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

footer {
    padding: 5px;
    background: rgba(0,0,0,0.1);
}

/* Scrollbar personalizado */
/* Scrollbars estilo terminal */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #000000;
    border: 1px solid #00ff00;
}

::-webkit-scrollbar-thumb {
    background: #003300;
    border: 1px solid #00ff00;
}

::-webkit-scrollbar-thumb:hover {
    background: #005500;
}

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

.game-section {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive */
@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }
    
    #upgrades {
        grid-column: 1 / 3;
        grid-row: 2;
    }
    
    #stats {
        grid-column: 1;
        grid-row: 1;
    }
    
    #story {
        grid-column: 2;
        grid-row: 1;
    }
    
    #combat {
        grid-column: 1;
        grid-row: 3;
    }
    
    #events-achievements {
        grid-column: 2;
        grid-row: 3;
    }
}

/* Dungeon Visual Interface */
.dungeon-map {
    background: #001100;
    border: 2px solid #00ff00;
    padding: 10px;
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
    min-height: 200px;
    overflow: auto;
}

.dungeon-controls-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.horizontal-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.movement-btn, .fight-btn, .exit-btn {
    background: #001100;
    color: #00ff00;
    border: 1px solid #00ff00;
    padding: 8px 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    text-shadow: 0 0 3px #00ff00;
    transition: all 0.2s ease;
    min-width: 80px;
}

.movement-btn:hover, .fight-btn:hover, .exit-btn:hover {
    background: #003300;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.3);
}

.fight-btn {
    background: #110000;
    color: #ff6666;
    border-color: #ff6666;
    text-shadow: 0 0 3px #ff6666;
    font-weight: bold;
}

.fight-btn:hover {
    background: #330000;
    box-shadow: 0 0 8px rgba(255, 102, 102, 0.3);
}

.fight-btn:disabled {
    background: #000000;
    color: #333333;
    border-color: #333333;
    cursor: not-allowed;
    text-shadow: none;
    box-shadow: none;
}

.exit-btn {
    background: #000011;
    color: #ffff00;
    border-color: #ffff00;
    text-shadow: 0 0 3px #ffff00;
}

.exit-btn:hover {
    background: #000033;
    box-shadow: 0 0 8px rgba(255, 255, 0, 0.3);
}

.dungeon-info-display {
    background: #000011;
    border: 1px solid #ffff00;
    padding: 8px;
    margin: 10px 0;
    font-size: 11px;
    color: #ffff00;
    text-align: center;
}

@keyframes boss-pulse {
    from { opacity: 0.7; }
    to { opacity: 1.0; }
}