/* Shadow Realms - Main CSS */
/* Halls of Torment inspired styling */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
    user-select: none;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #444;
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #666;
    transform: scale(1.1);
}

/* Navigation */
.game-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid #333;
    padding: 10px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-logo:hover {
    color: #ff6b6b;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: #ccc;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ff6b6b;
}

/* Beta Label */
.beta-label {
    color: #ff0000;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    margin-top: 15px;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    animation: pulse-red 2s infinite;
    z-index: 1001;
}

@keyframes pulse-red {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Game Container */
.game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 10;
}

/* Game Screens */
.game-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

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

/* Main Menu */
.menu-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid #444;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.game-title {
    font-size: 4rem;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.game-subtitle {
    font-size: 1.5rem;
    color: #ccc;
    margin-bottom: 40px;
    font-style: italic;
}

.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.menu-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid #444;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.menu-btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
}

.menu-btn.secondary {
    background: linear-gradient(45deg, #2c3e50, #34495e);
    border-color: #34495e;
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.menu-btn.primary:hover {
    background: linear-gradient(45deg, #ff5252, #d84315);
}

.menu-btn.secondary:hover {
    background: linear-gradient(45deg, #34495e, #2c3e50);
}

.game-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.info-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

.info-card h3 {
    color: #ff6b6b;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-card p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Game Screen */
#gameCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
}

/* Game UI */
.game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.ui-panel {
    position: absolute;
    top: 0;
    height: 100%;
    width: 300px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #333;
    pointer-events: auto;
    padding: 20px;
}

.left-panel {
    left: 0;
    border-right: none;
}

.right-panel {
    right: 0;
    border-left: none;
}

/* Player Level */
.player-level {
    text-align: center;
    margin-bottom: 20px;
}

.player-level span {
    font-size: 2rem;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Experience Bar */
.experience-bar {
    position: relative;
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.exp-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: linear-gradient(to top, #4ecdc4, #44a08d);
    transition: height 0.3s ease;
}

.exp-text {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Health Bar */
.health-bar {
    position: relative;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.health-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #ff6b6b, #ee5a24);
    transition: width 0.3s ease;
}

.health-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
}

/* Resource Orb */
.resource-orb {
    text-align: center;
    margin-top: 20px;
}

.orb-icon {
    font-size: 3rem;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Right Panel Elements */
.menu-button {
    width: 100%;
    padding: 10px;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}

.menu-button:hover {
    background: #ff5252;
}

/* Ability Slots */
.ability-slots {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.ability-slot {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #333;
    border-radius: 5px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.ability-slot:hover {
    border-color: #ff6b6b;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

/* Status Effects */
.status-effects {
    margin-bottom: 20px;
}

.status-slot {
    width: 50px;
    height: 30px;
    background: rgba(138, 43, 226, 0.8);
    border: 1px solid #8a2be2;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff;
}

/* Game Stats */
.game-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
}

.stat-icon {
    font-size: 1.2rem;
}

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

.version-info {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    margin-top: auto;
}

/* Level Up Screen */
.level-up-content {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #444;
    border-radius: 15px;
    padding: 40px;
    max-width: 1000px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.level-up-title {
    font-size: 3rem;
    color: #ffd700;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.level-up-subtitle {
    font-size: 1.5rem;
    color: #ccc;
    text-align: center;
    margin-bottom: 30px;
}

.level-up-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-box {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
}

.info-box h4 {
    color: #ff6b6b;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.info-box p {
    color: #ccc;
    line-height: 1.4;
}

/* Trait Selection */
.trait-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.trait-card {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #333;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.trait-card:hover {
    border-color: #ff6b6b;
    transform: translateY(-2px);
}

.trait-card.selected {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.trait-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.trait-card h3 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.trait-card p {
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Player Stats in Level Up */
.player-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
}

.stat-display {
    color: #4ecdc4;
    font-weight: bold;
    font-size: 1.1rem;
}

.health-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.health-orb {
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(255, 107, 107, 0.8);
}

#levelUpHealth {
    color: #ff6b6b;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Game Over Screen */
.game-over-content {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #444;
    border-radius: 15px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    text-align: center;
}

.game-over-title {
    font-size: 4rem;
    color: #ff6b6b;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.game-over-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 5px;
}

.stat-label {
    color: #ccc;
    font-size: 0.9rem;
}

.stat-value {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

.game-over-buttons {
    margin-top: 30px;
}

.game-over-btn {
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid #444;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.game-over-btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
}

.game-over-btn.secondary {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border-color: #4ecdc4;
}

.game-over-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Settings Screen */
.settings-content {
    background: rgba(0, 0, 0, 0.9);
    border: 3px solid #444;
    border-radius: 15px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 90%;
    overflow-y: auto;
}

.settings-title {
    font-size: 2.5rem;
    color: #ff6b6b;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 1px solid #333;
    padding-bottom: 5px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #222;
}

.setting-item label {
    color: #ccc;
    font-size: 1rem;
}

.setting-item select,
.setting-item input[type="range"] {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-radius: 5px;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.9rem;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #ff6b6b;
}

.setting-item input[type="range"] {
    width: 150px;
}

.settings-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.settings-btn {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: 2px solid #444;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.settings-btn.primary {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    border-color: #ff6b6b;
}

.settings-btn.secondary {
    background: linear-gradient(45deg, #2c3e50, #34495e);
    border-color: #34495e;
}

.settings-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2.5rem;
    }
    
    .game-subtitle {
        font-size: 1.2rem;
    }
    
    .ui-panel {
        width: 200px;
        padding: 15px;
    }
    
    .player-level span {
        font-size: 1.5rem;
    }
    
    .experience-bar {
        height: 150px;
    }
    
    .health-bar {
        height: 50px;
    }
    
    .orb-icon {
        font-size: 2rem;
    }
    
    .ability-slot {
        width: 40px;
        height: 40px;
    }
    
    .trait-selection {
        grid-template-columns: 1fr;
    }
    
    .game-over-stats {
        grid-template-columns: 1fr;
    }
    
    .level-up-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .ui-panel {
        width: 150px;
        padding: 10px;
    }
    
    .menu-content {
        padding: 20px;
        margin: 20px;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .game-subtitle {
        font-size: 1rem;
    }
    
    .menu-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .info-card {
        padding: 15px;
    }
    
    .info-card h3 {
        font-size: 1rem;
    }
    
    .info-card p {
        font-size: 0.8rem;
    }
}

/* Dark Theme Support */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-color: #ff6b6b;
    --border-color: #333333;
}

[data-theme="light"] {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --accent-color: #ff6b6b;
    --border-color: #dddddd;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.fade-out {
    animation: fadeOut 0.5s ease-out;
}

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

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

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: #0a0a0a;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #333;
    border-top: 3px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error-message {
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
}

/* Success States */
.success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    color: #4caf50;
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
} 

/* Pause Menu Modal */
.pause-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Reduced from 10000 to be below game UI */
}

.pause-content {
    background: #1a1a1a;
    border: 2px solid #444;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    color: white;
    font-family: 'Courier New', monospace;
    min-width: 300px;
}

.pause-content h2 {
    color: #ffaa00;
    margin-bottom: 20px;
    font-size: 24px;
}

.pause-content p {
    margin-bottom: 30px;
    color: #ccc;
}

.pause-content .btn {
    margin: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pause-content .btn-primary {
    background: #00aa00;
    color: white;
}

.pause-content .btn-primary:hover {
    background: #00cc00;
}

.pause-content .btn-secondary {
    background: #aa0000;
    color: white;
}

.pause-content .btn-secondary:hover {
    background: #cc0000;
} 

/* Initial Ability Selection Modal */
.ability-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.ability-selection-content {
    background: #1a1a1a;
    border: 3px solid #444;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    color: white;
    font-family: 'Courier New', monospace;
    max-width: 800px;
    width: 90%;
}

.ability-selection-content h2 {
    color: #ffaa00;
    margin-bottom: 20px;
    font-size: 28px;
    text-transform: uppercase;
}

.ability-selection-content p {
    margin-bottom: 30px;
    color: #ccc;
    font-size: 16px;
}

.ability-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.ability-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #444;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.ability-card:hover {
    border-color: #ffaa00;
    background: rgba(255, 170, 0, 0.1);
    transform: scale(1.05);
}

.ability-card .ability-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.ability-card h3 {
    color: #ffaa00;
    margin-bottom: 10px;
    font-size: 18px;
    text-transform: uppercase;
}

.ability-card p {
    color: #ccc;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

/* Website URL Styling */
.game-url, .game-over-url {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: #888;
}

.game-url a, .game-over-url a {
    color: #ff6b6b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.game-url a:hover, .game-over-url a:hover {
    color: #ff8e8e;
    text-decoration: underline;
}

.game-url-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
}

.game-url-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 12px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.game-url-link:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
} 