/* ==================== SOUL HARVEST GAME CSS ==================== */
/* Ultimate Edition - All visual effects and UI components */

/* -------------------- GAME WRAPPER (containment) -------------------- */
.sh-game-wrapper {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

/* -------------------- BASE GAME STYLES -------------------- */
.sh-game-container {
    background: linear-gradient(135deg, var(--void-mid) 0%, var(--void-primary, #0a0a12) 100%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.sh-game-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.sh-game-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--sanctuary-gold);
    font-family: var(--font-heading);
    margin-bottom: var(--space-xs);
}

.sh-game-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* -------------------- STATS BAR -------------------- */
.sh-stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.sh-stats-bar .sh-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-bottom: none;
    padding: 0;
}

.sh-stats-bar .sh-stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sanctuary-gold);
    font-family: var(--font-heading);
}

.sh-stats-bar .sh-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* -------------------- GAME AREA (click + upgrades side-by-side) -------------------- */
.sh-game-area {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.sh-click-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 300px;
}

/* -------------------- SOUL DISPLAY -------------------- */
.sh-soul-display {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.sh-soul-count {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sanctuary-gold);
    text-shadow: 0 0 20px rgba(201, 162, 39, 0.5);
    font-family: var(--font-heading);
}

.sh-soul-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

.sh-soul-rate {
    color: var(--digital-cyan);
    font-size: 0.9rem;
    margin-top: var(--space-xs);
}

/* -------------------- LEGACY DISPLAY ELEMENTS -------------------- */
.sh-souls-display {
    font-size: 3rem;
    font-weight: 700;
    color: var(--sanctuary-gold);
    text-shadow: 0 0 20px rgba(201, 162, 39, 0.5);
    font-family: var(--font-heading);
}

.sh-sps-display {
    color: var(--digital-cyan);
    font-size: 1.1rem;
    margin-top: var(--space-sm);
}

.sh-click-value {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: var(--space-xs);
}

/* -------------------- CLICK BUTTON -------------------- */
.sh-click-btn {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid var(--sanctuary-gold);
    background: radial-gradient(circle at 30% 30%, var(--glass-bg), var(--void-mid));
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    position: relative;
    box-shadow: 0 0 30px rgba(201, 162, 39, 0.3), inset 0 0 30px rgba(201, 162, 39, 0.1);
}

.sh-click-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(201, 162, 39, 0.5), inset 0 0 40px rgba(201, 162, 39, 0.2);
}

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

.sh-click-btn-icon,
.sh-click-icon {
    font-size: 4rem;
    filter: drop-shadow(0 0 10px rgba(201, 162, 39, 0.5));
}

.sh-click-btn-text,
.sh-click-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

/* -------------------- UPGRADES PANEL -------------------- */
.sh-upgrades-panel {
    flex: 1;
    max-height: 500px;
    overflow-y: auto;
    padding-right: var(--space-xs);
}

.sh-upgrades-panel::-webkit-scrollbar {
    width: 4px;
}

.sh-upgrades-panel::-webkit-scrollbar-track {
    background: transparent;
}

.sh-upgrades-panel::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.sh-panel-title {
    color: var(--sanctuary-gold);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    font-family: var(--font-heading);
}

/* -------------------- PARTICLE EFFECTS -------------------- */
.sh-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 50;
    overflow: hidden;
}

.sh-particle {
    position: absolute;
    color: var(--digital-cyan);
    font-weight: 600;
    font-size: 1rem;
    pointer-events: none;
    animation: particleFloat 1s ease-out forwards;
    text-shadow: 0 0 10px currentColor;
    z-index: 51;
}

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) translateX(var(--drift-x, 0)) scale(0.5);
    }
}

/* Burst particles */
.sh-burst-particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 50;
}

@keyframes burstParticle {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--burst-x, 0), var(--burst-y, 0)) scale(0);
    }
}

/* -------------------- COMBO SYSTEM -------------------- */
.sh-combo-display {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 60;
    display: none;
    pointer-events: none;
}

.combo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--soul-purple);
    text-shadow: 0 0 20px currentColor;
    animation: comboPulse 0.3s ease-out;
}

.combo-multiplier {
    font-size: 1.2rem;
    color: var(--digital-cyan);
    margin-top: var(--space-xs);
}

.sh-combo-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: var(--space-sm) auto 0;
    overflow: hidden;
}

.sh-combo-bar::after {
    content: '';
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--soul-purple), var(--digital-cyan));
    width: 100%;
}

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

/* -------------------- AMBIENT SOULS -------------------- */
.sh-ambient-soul {
    position: absolute;
    font-size: 1.5rem;
    opacity: 0.6;
    pointer-events: none;
    z-index: 1;
    animation: ambientSoul 10s linear forwards;
}

@keyframes ambientSoul {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-500px) rotate(360deg);
        opacity: 0;
    }
}

/* -------------------- GOLDEN SOULS -------------------- */
.sh-golden-souls {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 70;
}

.sh-golden-soul {
    position: absolute;
    font-size: 2.5rem;
    cursor: pointer;
    pointer-events: auto;
    animation: goldenSoulFloat 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px #c9a227);
    transition: transform 0.2s ease;
    z-index: 71;
}

.sh-golden-soul:hover {
    transform: scale(1.3);
}

@keyframes goldenSoulFloat {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

/* -------------------- VOID TERROR (MINI-BOSS) -------------------- */
.sh-void-terror-container {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 80;
    pointer-events: none;
}

.sh-void-terror {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.9), rgba(50, 0, 0, 0.95));
    border: 2px solid #ff4444;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    min-width: 220px;
    text-align: center;
    animation: terrorAppear 0.5s ease-out;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 0 30px rgba(255, 68, 68, 0.5);
}

.terror-icon {
    font-size: 3rem;
    animation: terrorShake 0.5s ease-in-out infinite;
}

.terror-health {
    width: 100%;
    height: 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    margin: var(--space-md) 0;
    overflow: hidden;
}

.terror-health-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff8888);
    transition: width 0.1s ease;
    width: 100%;
}

.terror-text {
    font-size: 0.9rem;
    color: #ff8888;
    font-weight: 600;
}

@keyframes terrorAppear {
    0% { transform: scale(0) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes terrorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-5deg); }
    75% { transform: translateX(5px) rotate(5deg); }
}

@keyframes terrorFlee {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0) translateX(100px); opacity: 0; }
}

/* -------------------- SCREEN SHAKE -------------------- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* -------------------- UPGRADES LIST -------------------- */
.sh-upgrades {
    margin-top: var(--space-xl);
}

.sh-upgrades h3 {
    color: var(--sanctuary-gold);
    margin-bottom: var(--space-md);
    font-size: 1.2rem;
}

.sh-upgrades-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.sh-upgrade {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sh-upgrade-available {
    border-color: var(--digital-cyan);
}

.sh-upgrade-available:hover {
    background: rgba(78, 205, 196, 0.1);
    transform: translateX(5px);
}

.sh-upgrade-locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.sh-upgrade-maxed {
    border-color: var(--sanctuary-gold);
    opacity: 0.7;
    cursor: default;
}

.sh-upgrade-icon {
    font-size: 1.8rem;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.sh-upgrade-info {
    flex: 1;
    min-width: 0;
}

.sh-upgrade-name {
    font-weight: 600;
    color: var(--text-primary);
}

.sh-upgrade-level {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: var(--space-xs);
}

.sh-upgrade-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.sh-upgrade-value {
    font-size: 0.8rem;
    color: var(--digital-cyan);
    margin-top: 2px;
}

.sh-upgrade-cost {
    font-weight: 600;
    color: var(--sanctuary-gold);
    white-space: nowrap;
    flex-shrink: 0;
}

.sh-upgrade-purchased {
    animation: upgradeFlash 0.3s ease;
}

@keyframes upgradeFlash {
    0% { background: var(--digital-cyan); }
    100% { background: var(--glass-bg); }
}

/* -------------------- PRESTIGE SYSTEM -------------------- */
.sh-prestige {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1), rgba(201, 162, 39, 0.05));
    border: 1px solid var(--sanctuary-gold);
    border-radius: var(--radius-lg);
}

.sh-prestige-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.sh-prestige-header h4 {
    color: var(--sanctuary-gold);
    margin: 0;
}

.sh-prestige-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sh-prestige-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
}

.sh-divine-favor {
    color: var(--sanctuary-gold);
    font-weight: 600;
}

.sh-prestige-req {
    color: var(--text-muted);
}

.sh-prestige-btn {
    width: 100%;
    padding: var(--space-md);
    background: linear-gradient(135deg, var(--sanctuary-gold), #e0b84d);
    color: var(--void-primary, #0a0a12);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: var(--space-sm);
}

.sh-prestige-btn:hover:not(.disabled) {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(201, 162, 39, 0.4);
}

.sh-prestige-btn.disabled {
    background: var(--void-mid);
    color: var(--text-muted);
    cursor: not-allowed;
}

.sh-prestige-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

/* -------------------- SACRIFICES -------------------- */
.sh-sacrifices {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.1), rgba(50, 0, 0, 0.05));
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: var(--radius-lg);
}

.sh-sacrifice-header h4 {
    color: #ff8888;
    margin: 0 0 var(--space-xs) 0;
}

.sh-sacrifice-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.sh-sacrifice-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.sh-sacrifice-btn {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.sh-sacrifice-btn:hover:not(.disabled) {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
}

.sh-sacrifice-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.sh-sacrifice-btn.active {
    border-color: var(--sanctuary-gold);
    background: rgba(201, 162, 39, 0.1);
}

.sh-sacrifice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.sh-sacrifice-info {
    flex: 1;
    min-width: 0;
}

.sh-sacrifice-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.sh-sacrifice-cost {
    font-size: 0.75rem;
    color: #ff8888;
}

.sh-sacrifice-effect {
    font-size: 0.75rem;
    color: var(--digital-cyan);
}

.sh-sacrifice-timer {
    font-size: 0.7rem;
    color: var(--sanctuary-gold);
    margin-top: 2px;
}

/* -------------------- GAME FOOTER -------------------- */
.sh-game-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.sh-game-stats {
    display: flex;
    gap: var(--space-md);
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.sh-game-stats span {
    white-space: nowrap;
}

.sh-game-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.sh-btn-small {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.sh-btn-small:hover {
    background: rgba(201, 162, 39, 0.15);
    border-color: var(--sanctuary-gold);
    color: var(--text-primary);
}

/* -------------------- MODAL (achievements, etc.) -------------------- */
.sh-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: var(--space-xl);
}

.sh-modal-content {
    background: var(--void-mid);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: var(--space-xl);
}

.sh-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.sh-modal-title {
    color: var(--sanctuary-gold);
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin: 0;
}

.sh-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 var(--space-xs);
    transition: color 0.2s ease;
}

.sh-modal-close:hover {
    color: var(--text-primary);
}

.sh-modal-body {
    /* container for modal content */
}

/* -------------------- ACHIEVEMENTS -------------------- */
.sh-achievements {
    margin-top: var(--space-xl);
}

.sh-achievements h3 {
    color: var(--sanctuary-gold);
    margin-bottom: var(--space-md);
}

.sh-achievements-section {
    margin-bottom: var(--space-lg);
}

.sh-achievements-section h4 {
    color: var(--digital-cyan);
    margin-bottom: var(--space-md);
    font-size: 1rem;
}

.sh-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-md);
}

.sh-achievement {
    text-align: center;
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.sh-achievement-unlocked {
    border-color: var(--sanctuary-gold);
    background: rgba(201, 162, 39, 0.1);
}

.sh-achievement-locked {
    opacity: 0.5;
}

.sh-achievement-icon {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
}

.sh-achievement-name {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Achievement toast notification - stays fixed for viewport overlay */
.sh-achievement-toast {
    position: fixed;
    top: 20px;
    right: -400px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.95), rgba(201, 162, 39, 0.8));
    color: var(--void-primary, #0a0a12);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    box-shadow: 0 4px 20px rgba(201, 162, 39, 0.4);
    z-index: 10000;
    transition: right 0.5s ease;
}

.sh-achievement-toast.show {
    right: 20px;
}

.sh-achievement-toast-icon {
    font-size: 2rem;
}

.sh-achievement-toast-title {
    font-size: 0.8rem;
    opacity: 0.9;
}

.sh-achievement-toast-name {
    font-size: 1.1rem;
    font-weight: 700;
}

/* -------------------- STATS -------------------- */
.sh-stats {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--glass-border);
}

.sh-stats h3 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.sh-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
}

.sh-stat {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--glass-border);
}

.sh-stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.sh-stat-value {
    color: var(--digital-cyan);
    font-weight: 600;
}

/* -------------------- SAVE STATUS - stays fixed for viewport -------------------- */
.sh-save-status {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    color: var(--digital-cyan);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
    backdrop-filter: blur(10px);
}

/* -------------------- OFFLINE POPUP -------------------- */
.sh-offline-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--void-mid);
    border: 2px solid var(--sanctuary-gold);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    text-align: center;
    z-index: 2000;
    min-width: 300px;
    box-shadow: 0 0 60px rgba(201, 162, 39, 0.3);
}

.sh-offline-popup h3 {
    color: var(--sanctuary-gold);
    margin-bottom: var(--space-md);
}

.sh-offline-popup .sh-offline-souls {
    font-size: 2rem;
    font-weight: 700;
    color: var(--digital-cyan);
    margin: var(--space-md) 0;
}

.sh-offline-popup button {
    background: linear-gradient(135deg, var(--sanctuary-gold), #e0b84d);
    color: var(--void-primary, #0a0a12);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-lg);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.sh-offline-popup button:hover {
    transform: scale(1.05);
}

.sh-offline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1999;
}

/* -------------------- RESET BUTTON -------------------- */
.sh-reset {
    margin-top: var(--space-xl);
    text-align: center;
}

#sh-reset-btn {
    background: transparent;
    border: 1px solid rgba(255, 68, 68, 0.5);
    color: #ff8888;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

#sh-reset-btn:hover {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff4444;
}

/* -------------------- CLICK STREAK BADGE -------------------- */
.sh-click-streak {
    display: none;
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ff6b6b, #ff4444);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    z-index: 10;
    animation: streakPulse 0.3s ease-out;
    pointer-events: none;
    white-space: nowrap;
}

@keyframes streakPulse {
    0% { transform: scale(0.5); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* -------------------- SACRIFICE TINT OVERLAY -------------------- */
.sh-sacrifice-tint {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    border-radius: var(--radius-xl);
    transition: background 0.5s ease;
}

/* -------------------- KONAMI POPUP -------------------- */
.sh-konami-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: var(--void-mid);
    border: 2px solid var(--sanctuary-gold);
    border-radius: var(--radius-xl);
    padding: var(--space-xl) var(--space-xxl);
    text-align: center;
    z-index: 10000;
    box-shadow: 0 0 60px rgba(201, 162, 39, 0.5);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
}

.sh-konami-popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* -------------------- MILESTONES PANEL -------------------- */
.sh-milestones {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.sh-milestone {
    margin-bottom: var(--space-sm);
}

.sh-milestone:last-child {
    margin-bottom: 0;
}

.sh-milestone-header {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: 4px;
    font-size: 0.8rem;
}

.sh-milestone-text {
    flex: 1;
    color: var(--text-secondary);
}

.sh-milestone-pct {
    color: var(--digital-cyan);
    font-weight: 600;
    font-size: 0.75rem;
}

.sh-milestone-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.sh-milestone-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--digital-cyan), var(--sanctuary-gold));
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* -------------------- DIVINE SHOP -------------------- */
.sh-divine-shop {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

.sh-divine-shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.sh-divine-shop-header h4 {
    color: var(--sanctuary-gold);
    margin: 0;
    font-size: 1rem;
}

.sh-divine-essence {
    color: var(--sanctuary-gold);
    font-weight: 600;
    font-size: 0.9rem;
}

.sh-divine-upgrades {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.sh-divine-upgrade {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.sh-divine-upgrade.available {
    opacity: 1;
    border-color: var(--sanctuary-gold);
}

.sh-divine-upgrade.available:hover {
    background: rgba(201, 162, 39, 0.1);
    transform: translateX(3px);
}

.sh-divine-upgrade.maxed {
    opacity: 0.6;
    cursor: default;
    border-color: var(--digital-cyan);
}

.sh-divine-upgrade-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.sh-divine-upgrade-info {
    flex: 1;
    min-width: 0;
}

.sh-divine-upgrade-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.sh-divine-upgrade-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sh-divine-upgrade-cost {
    font-weight: 600;
    color: var(--sanctuary-gold);
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* -------------------- DETAILED STATS MODAL -------------------- */
.sh-stats-grid-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
}

.sh-detail-stat {
    display: flex;
    justify-content: space-between;
    padding: var(--space-xs) var(--space-sm);
    background: var(--glass-bg);
    border-radius: var(--radius-sm, 4px);
}

.sh-detail-label {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.sh-detail-value {
    color: var(--digital-cyan);
    font-weight: 600;
    font-size: 0.8rem;
}

/* -------------------- RARITY BREAKDOWN -------------------- */
.sh-rarity-breakdown {
    margin-top: var(--space-xs);
}

.sh-rarity-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.sh-rarity-segment {
    height: 100%;
    transition: width 0.3s ease;
    min-width: 1px;
}

.sh-rarity-legend {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xs);
    font-size: 0.75rem;
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 768px) {
    .sh-game-area {
        flex-direction: column;
    }

    .sh-upgrades-panel {
        max-height: 300px;
        width: 100%;
    }

    .sh-stats-bar {
        gap: var(--space-md);
        flex-wrap: wrap;
    }

    .sh-sacrifice-list {
        grid-template-columns: 1fr;
    }

    .sh-game-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .sh-game-stats {
        justify-content: center;
    }

    .sh-game-actions {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .sh-game-container {
        padding: var(--space-md);
    }

    .sh-click-btn {
        width: 150px;
        height: 150px;
    }

    .sh-click-btn-icon,
    .sh-click-icon {
        font-size: 3rem;
    }

    .sh-soul-count {
        font-size: 2rem;
    }

    .sh-stats-bar .sh-stat-value {
        font-size: 1.1rem;
    }

    .sh-golden-soul {
        font-size: 2rem;
    }

    .sh-stats-grid-detail {
        grid-template-columns: 1fr;
    }

    .sh-rarity-legend {
        flex-direction: column;
        gap: 2px;
    }
}
