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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    padding: 15px;
    overflow-x: hidden;
}

/* Main Layout Grid */
.main-layout {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.game-content {
    flex-grow: 1;
    min-width: 0; 
}

/* Hamburger Button */
.hamburger-btn {
    position: fixed;
    top: 15px;
    right: 280px; 
    background: linear-gradient(145deg, #7b1fa2, #4a148c);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.hamburger-btn:hover { transform: scale(1.1); background: linear-gradient(145deg, #9c27b0, #6a1b9a); }

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    margin: 5px auto;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) { transform: rotate(45deg) translate(8px, 8px); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }

/* Side Panel */
.side-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: right 0.4s ease-in-out;
    overflow-y: auto;
    padding: 20px;
}

.side-panel.open { right: 0; }

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ffd700;
}

.panel-header h2 { color: #ffd700; font-size: 1.4rem; }

.close-panel-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-panel-btn:hover { color: #ffd700; transform: rotate(90deg); }

/* Currency Sidebar */
.currency-frame {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.currency-frame h3 { 
    margin-bottom: 10px; 
    color: #ffd700; 
    font-size: 1.1rem;
    text-align: center;
}

.currency-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 3px 0;
    border-radius: 5px;
    font-size: 0.9rem;
}

.currency-name { 
    color: #fff; 
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.currency-amount { font-weight: bold; font-size: 1.1rem; min-width: 60px; text-align: right; }

/* Currency Colors */
.humans-currency { background-color: #FCE4EC; color: #E91E63; } 
.prayers-currency { background-color: #E8F5E9; color: #2E7D32; }
.grace-currency { background-color: #FFF3E0; color: #E65100; }
.vessel-currency { background-color: #E3F2FD; color: #1565C0; }
.scripture-currency { background-color: #F3E5F5; color: #7B1FA2; }
.blessing-currency { background-color: #FFECB3; color: #FF8F00; }
.manna-currency { background-color: #C8E6C9; color: #388E3C; }
.souls-currency { background-color: #FFCCBC; color: #D84315; }
.wisdom-currency { background-color: #BBDEFB; color: #0277BD; }
.miracle-currency { background-color: #FFE0B2; color: #E65100; }
.aura-currency { background-color: #E1BEE7; color: #8E24AA; }
.icon-currency { background-color: #FFF9C4; color: #FBC02D; box-shadow: 0 0 5px #FFD700; }

/* Tier Display */
.tier-badge {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: bold;
    margin-right: 4px;
}

.tier-common { background-color: #9E9E9E; color: white; }
.tier-principalities { background-color: #4CAF50; color: white; }
.tier-powers { background-color: #FF5722; color: white; }
.tier-virtues { background-color: #FFD700; color: black; }
.tier-dominions { background-color: #9C27B0; color: white; }
.tier-thrones { background-color: #03A9F4; color: white; }
.tier-cherubim { background-color: #8BC34A; color: black; }
.tier-seraphim { background-color: #E91E63; color: white; }
.tier-archangels { background-color: #FFD700; color: black; box-shadow: 0 0 15px #FFD700; }

/* Tier Display Section */
.tier-display-section {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.tier-display-section h3 { 
    color: #ffd700; 
    margin-bottom: 15px;
    text-align: center;
}

.tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 15px;
}

.tier-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 6px;
    text-align: center;
}

.tier-card.locked { opacity: 0.3; pointer-events: none; }
.tier-card.unlocked { opacity: 1; }

.tier-name { font-size: 0.85rem; color: #ffd700; margin-bottom: 4px; }
.tier-count { font-size: 1rem; color: #fff; margin-bottom: 3px; }
.tier-desc { font-size: 0.65rem; color: #aaa; line-height: 1.2; }

/* Prayer Section */
.prayer-section {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.prayer-section h3 { margin-bottom: 15px; color: #ffd700; text-align: center; font-size: 1.2rem; }

/* Click Button */
.click-btn {
    display: block;
    width: 90%;
    margin: 20px auto;
    padding: 15px 30px;
    font-size: 1.1rem;
    background: linear-gradient(145deg, #7b1fa2, #4a148c);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.click-btn:hover { background: linear-gradient(145deg, #9c27b0, #6a1b9a); transform: scale(1.02); }
.click-btn:active { transform: scale(0.98); }

/* Panel Angel Cards */
.angel-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.angel-card.locked { opacity: 0.4; pointer-events: none; }
.angel-card.unlocked { opacity: 1; }

.premium-angel { border: 2px solid #ffd700; }

.angel-name { font-size: 1rem; color: #ffd700; margin-bottom: 5px; }
.angel-count { font-size: 1.2rem; color: #fff; margin-bottom: 5px; }
.angel-cost { font-size: 0.85rem; color: #aaa; margin-bottom: 3px; }
.angel-buff { font-size: 0.7rem; color: #4CAF50; line-height: 1.2; margin-top: 3px; }

/* Panel Angel Buttons */
.buy-option-btn {
    background: linear-gradient(145deg, #7b1fa2, #4a148c);
    border: none;
    padding: 6px 10px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-option-btn:hover:not(:disabled) { background: linear-gradient(145deg, #9c27b0, #6a1b9a); }
.buy-option-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.quick-buys { display: flex; gap: 5px; margin-top: 8px; justify-content: center; }

/* Panel Unlock Requirements */
.unlock-req { font-size: 0.7rem; color: #FFB300; margin-top: 4px; text-align: center; }

/* Prestige Section */
.prestige-section {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid #ffd700;
}

.prestige-section h3 { 
    color: #ffd700; 
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.4rem;
}

/* Prestige Counter */
.prestige-counter {
    text-align: center;
    font-size: 2rem;
    color: #ffd700;
    margin-top: 15px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

.multiplier-display {
    text-align: center;
    font-size: 1.2rem;
    color: #ffd700;
    margin-top: 10px;
}

/* Production Info */
.production-info {
    background: linear-gradient(145deg, #2a2a4a, #1e1e3a);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
}

.production-info h4 { color: #ffd700; margin-bottom: 10px; }

.production-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Action Buttons */
.action-buttons { display: flex; justify-content: center; gap: 15px; margin: 15px 0; }

.action-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.save-btn { background: linear-gradient(145deg, #2e7d32, #1b5e20); color: white; }
.load-btn { background: linear-gradient(145deg, #1976d2, #0d47a1); color: white; }
.new-btn { background: linear-gradient(145deg, #c62828, #b71c1c); color: white; }

.action-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); }

/* Status */
.status-bar { text-align: center; padding: 10px; font-size: 1rem; color: #aaa; min-height: 24px; margin-bottom: 15px;}

/* Floating Numbers Animation */
.floating-number {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
    font-weight: bold;
    animation: floatUp 1.5s ease-out forwards;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-100px) scale(1.5); }
}

/* Particle Effects */
.particle {
    position: fixed;
    pointer-events: none;
    z-index: 999;
    border-radius: 50%;
    animation: particleAnim 1s ease-out forwards;
}

@keyframes particleAnim {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0.2); }
}

/* Sparkle Effect */
.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 998;
    animation: sparkleAnim 0.6s ease-out forwards;
}

@keyframes sparkleAnim {
    0% { opacity: 1; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0; transform: scale(0); }
}

/* Sound Toggle */
.sound-toggle { text-align: center; margin-top: 10px; }
.sound-btn { background: #333; color: #fff; padding: 8px 20px; border-radius: 5px; cursor: pointer; font-size: 0.9rem; border: none;}

/* Backdrop overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.overlay.active { display: block; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .hamburger-btn { right: 15px; }
}