:root {
    --background-color: #ecf0f1;
    --main-text-color: #2c3e50;
    --panel-bg-color: #ffffff;
    --accent-color: #3498db;
    --bonus-color: #27ae60;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--main-text-color);
    overflow: hidden;
    user-select: none; 
    -webkit-user-select: none;
    -ms-user-select: none;
    -moz-user-select: none;
}

.page { display: none; width: 100%; height: 100%; }
.page.active { display: flex; }
.game-container { width: 100%; height: 100%; padding: 10px; }

.shop-panel {
    flex: 0 0 300px;
    background-color: var(--panel-bg-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
    padding: 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.shop-panel h3 {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--background-color);
    padding-bottom: 10px;
}

.shop-tabs { display: flex; margin-bottom: 20px; }
.tab-btn {
    flex: 1; padding: 10px; border: 1px solid #ddd;
    background-color: #f0f0f0; cursor: pointer; text-align: center;
    font-weight: bold; transition: all 0.2s;
}
.tab-btn:first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; border-right: none; }
.tab-btn:last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.tab-btn.active { background-color: var(--accent-color); color: white; border-color: var(--accent-color); }
.tab-btn:not(.active):hover { background-color: #e0e0e0; }

.shop-tab-content { display: none; }
.shop-tab-content.active { display: block; }

.bulk-buy-controls {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    background-color: var(--background-color);
    padding: 5px;
    border-radius: 8px;
}
.bulk-buy-controls span { font-weight: bold; margin-right: 10px; }
.bulk-btn {
    flex-grow: 1; padding: 8px; border: none;
    background-color: transparent; border-radius: 6px;
    cursor: pointer; font-weight: bold;
    transition: all 0.2s;
}
.bulk-btn.active { background-color: var(--accent-color); color: white; }
.bulk-btn:not(.active):hover { background-color: #d5d8dc; }

.upgrade-item {
    padding: 12px; margin-bottom: 10px; border: 1px solid #ddd;
    border-radius: 8px; background-color: #f9f9f9;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.upgrade-item:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.upgrade-item-header { display: flex; align-items: center; font-weight: bold; }
.upgrade-icon { font-size: 1.8em; margin-right: 12px; }
.upgrade-details { font-size: 0.9em; color: #555; margin: 6px 0; }
.upgrade-cost { font-size: 0.8em; color: #888; margin-top: 4px; }


.buy-btn, .equip-btn, .nav-btn {
    width: 100%; padding: 10px; border: none;
    border-radius: 6px; color: white; cursor: pointer;
    font-weight: bold; font-size: 1em;
    transition: background-color 0.2s ease; margin-top: 5px;
}
.buy-btn { background-color: var(--accent-color); }
.buy-btn:hover:not(:disabled) { background-color: #2980b9; }
.buy-btn:disabled { background-color: #bdc3c7; cursor: not-allowed; }
.equip-btn { background-color: var(--bonus-color); }
.equip-btn:hover:not(:disabled) { background-color: #2ecc71; }
.equip-btn:disabled { background-color: #7f8c8d; cursor: not-allowed; }
.nav-btn { background-color: #95a5a6; }
.nav-btn:hover:not(:disabled) { background-color: #7f8c8d; }
.nav-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.nav-btn.secondary { background-color: #bdc3c7; }
.nav-btn.secondary:hover { background-color: #95a5a6; }

.main-game-area {
    flex-grow: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 0 20px;
    position: relative;
    overflow: hidden;
}

.score-display, .info-display, #clicker-target-area {
    position: relative;
    z-index: 5;
}

.score-display {
    font-size: 4em;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.info-display {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    font-size: 1.1em;
    color: #555;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

#clicker-target-area {
    margin: 20px 0; width: 100%; max-width: 500px; height: 300px;
    border-radius: 15px; position: relative; overflow: hidden; cursor: pointer;
}
#bald-head {
    position: absolute; top: 40%; left: 40%;
    font-size: 80px; user-select: none; transition: transform 0.1s ease;
}
#bald-head.clicked { transform: scale(0.9); }

.bonus-head {
    position: absolute; font-size: 80px; cursor: pointer; user-select: none;
    border: 4px solid gold; border-radius: 50%; box-shadow: 0 0 20px gold;
    animation: pulse 1s infinite; z-index: 100;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

.stats-container,
.prestige-container,
.achievements-container,
.talents-container {
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    justify-content: flex-start;
    padding: 0 0 100px 0;
}

.prestige-container {
    background: radial-gradient(circle, #fdfefe, #f1f2f3);
}

.stats-grid,
.achievements-grid,
.talent-currency-display {
    padding: 0 40px 20px 40px;
}

.prestige-layout {
    display: flex;
    width: 100%;
    max-width: 1000px;
    gap: 20px;
    padding: 20px;
}

.prestige-column {
    display: flex;
    flex-direction: column;
    width: 50%;
}

.prestige-card {
    background-color: var(--panel-bg-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    width: 100%;
}

.prestige-actions .prestige-card {
    text-align: center;
}

.prestige-card h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--main-text-color);
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
    letter-spacing: 1px;
}

#prestige-upgrades-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 10px;
}

.prestige-card p { margin: 15px 0; font-size: 1.1em; line-height: 1.6; }
.prestige-card hr { border: 0; height: 1px; background-color: #ddd; margin: 20px 0; }
.prestige-info { display: flex; justify-content: space-between; font-size: 1.1em; padding: 10px 0; }

.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px; width: 100%; max-width: 1200px;
    margin-top: 20px;
}
.stat-card {
    background-color: var(--panel-bg-color); border-radius: 12px;
    padding: 20px; box-shadow: 0 4px 12px var(--shadow-color);
}
.stat-card h3 { color: var(--accent-color); margin-bottom: 15px; }
.stat-card ul { list-style: none; padding: 0;}
.simple-stats-list li {
    display: flex; justify-content: space-between; padding: 8px 0;
    border-bottom: 1px solid var(--background-color);
}
.simple-stats-list li:last-child { border-bottom: none; }
.stat-card .stat-value { font-weight: bold; }

#stat-production-breakdown li { padding: 8px 0; border-bottom: 1px solid var(--background-color); }
#stat-production-breakdown li:last-child { border-bottom: none; }
.production-stat-item { display: flex; align-items: center; gap: 10px; }
.production-stat-item .upgrade-icon { font-size: 1.5em; }
.production-stat-info { flex-grow: 1; }
.production-stat-info small { color: #555; margin-left: 5px; }
.production-stat-percent { font-weight: bold; color: var(--accent-color); }
.production-progress-bar-container { width: 100%; background-color: #eee; border-radius: 4px; height: 8px; margin-top: 4px; overflow: hidden; }
.production-progress-bar { height: 100%; background-color: var(--bonus-color); border-radius: 4px; transition: width 0.3s ease; }

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 1000px;
    margin-top: 20px;
}
.achievement-card {
    background-color: var(--panel-bg-color);
    border-radius: 12px; padding: 15px;
    box-shadow: 0 4px 12px var(--shadow-color);
    display: flex; align-items: center; gap: 15px;
    transition: all 0.3s ease;
}
.achievement-card.locked { filter: grayscale(1); opacity: 0.6; }
.achievement-icon { font-size: 3em; }
.achievement-info h4 { margin-bottom: 5px; }
.achievement-info p { font-size: 0.9em; color: #555; }

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-content {
    background-color: var(--panel-bg-color);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.modal-content h2 { color: var(--accent-color); margin-bottom: 15px; }
.modal-content p { margin-bottom: 10px; font-size: 1.1em; }
.offline-earnings-amount { font-size: 1.8em; font-weight: bold; color: var(--bonus-color); margin: 20px 0; }
.modal-button-group { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }
.modal-button-group .nav-btn { width: auto; padding: 10px 20px;}

.bottom-nav {
    position: fixed; bottom: 20px; left: 50%;
    transform: translateX(-50%);
    display: flex; gap: 15px; z-index: 500;
}
.bottom-nav .nav-btn { width: auto; padding: 12px 25px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }

.talent-currency-display {
    font-size: 1.2em;
    margin-top: 20px; 
    margin-bottom: 20px;
    background-color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.talent-currency-display span { font-weight: bold; color: #e67e22; }
.talent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}
.talent-card {
    background-color: var(--panel-bg-color); border-radius: 12px; padding: 15px;
    box-shadow: 0 4px 12px var(--shadow-color); text-align: center;
    border: 2px solid #ddd; transition: all 0.3s ease;
}
.talent-card.purchased { border-color: var(--bonus-color); background-color: #f0fff4; }
.talent-card.can-purchase { border-color: var(--accent-color); cursor: pointer; }
.talent-card.can-purchase:hover { transform: translateY(-5px); box-shadow: 0 6px 15px rgba(0,0,0,0.15); }
.talent-card.locked { filter: grayscale(1); opacity: 0.7; cursor: not-allowed; }
.talent-icon { font-size: 3em; margin-bottom: 10px; }
.talent-name { font-weight: bold; margin-bottom: 8px; font-size: 1.1em; }
.talent-description { font-size: 0.85em; color: #555; margin-bottom: 10px; min-height: 50px; }
.talent-cost { font-weight: bold; color: #e67e22; }

#prestige-container-main {
    position: absolute; top: 20px; left: 315px;
    width: 200px; z-index: 10;
}
#prestige-button-main {
    width: 100%; padding: 10px; font-size: 1.1em;
    position: relative; overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    line-height: 1.2; background-color: #7f8c8d;
}
#prestige-button-main:not(:disabled) { background-color: #e67e22; }
.progress-bar-container {
    position: absolute; bottom: 0; left: 0;
    width: 100%; height: 100%;
    background-color: transparent; z-index: 1;
}
.progress-bar-fill {
    width: 0%; height: 100%;
    background-color: var(--bonus-color); opacity: 0.5;
    transition: width 0.5s ease;
}
#prestige-progress-text {
    position: relative; z-index: 2; font-size: 0.9em;
    color: white; text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    margin-top: 4px;
}
#prestige-button-main.shake { animation: shake 0.5s; }
@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

.cheat-btn { background-color: #e74c3c; }
.cheat-btn:hover:not(:disabled) { background-color: #c0392b; }

.page-header {
    position: sticky; top: 0; width: 100%;
    background-color: var(--background-color);
    padding: 15px 40px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 600;
}
.page-header h1 { font-size: 2em; margin-bottom: 0; }
.page-header .nav-btn { width: auto; padding: 10px 20px; margin-top: 0; }

.simon-modal-content { max-width: 500px; }
#simon-game-area {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 20px; width: 300px; height: 300px;
    margin: 20px auto;
}
.simon-head {
    width: 100%; height: 100%;
    border-radius: 50%; cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    display: flex; justify-content: center; align-items: center;
    font-size: 5em; background-color: #f0f0f0;
    border: 7px solid #ccc;
}
.simon-head.no-events { pointer-events: none; }
.simon-head[data-simon-id="0"] { border-color: #2980b9; }
.simon-head[data-simon-id="1"] { border-color: #c0392b; }
.simon-head[data-simon-id="2"] { border-color: #f1c40f; }
.simon-head[data-simon-id="3"] { border-color: #27ae60; }
.simon-head.active { transform: scale(0.95); }
.simon-head.active[data-simon-id="0"] { box-shadow: 0 0 25px #2980b9, inset 0 0 15px #2980b9; }
.simon-head.active[data-simon-id="1"] { box-shadow: 0 0 25px #c0392b, inset 0 0 15px #c0392b; }
.simon-head.active[data-simon-id="2"] { box-shadow: 0 0 25px #f1c40f, inset 0 0 15px #f1c40f; }
.simon-head.active[data-simon-id="3"] { box-shadow: 0 0 25px #27ae60, inset 0 0 15px #27ae60; }
#simon-level-display { font-size: 1.2em; font-weight: bold; margin-top: 10px; }
#minigame-trigger {
    position: absolute; top: 20px; left: 20px;
    font-size: 40px; cursor: pointer; z-index: 20;
    animation: pulse-minigame 2s infinite;
    transition: transform 0.3s;
}
#minigame-trigger:hover { transform: scale(1.2); }
@keyframes pulse-minigame {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

#rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
.falling-head {
    position: absolute;
    top: -100px;
    font-size: 2em;
    opacity: 0.5;
    animation: fall linear;
}
@keyframes fall {
    to {
        transform: translateY(110vh);
        opacity: 0;
    }
}

#combo-display {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--bonus-color);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    animation: pulse-combo 0.5s;
}

@keyframes pulse-combo {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

@media (max-width: 950px) {
    .game-container { flex-direction: column; height: auto; overflow-y: auto; }
    .shop-panel { flex: 0 0 auto; width: 100%; margin-bottom: 20px; max-height: 40vh; }
    .main-game-area { order: -1; padding-top: 80px; }
    .score-display { font-size: 3em; }
    #prestige-container-main {
        position: absolute; top: 10px; left: 50%;
        transform: translateX(-50%); width: 90%; max-width: 300px;
    }
    .page-header { padding: 10px 15px; }
    .page-header h1 { font-size: 1.5em; }
    .stats-grid, .achievements-grid, .prestige-card, .talent-currency-display, .prestige-layout {
        padding: 0 15px 20px 15px;
    }
    .prestige-layout {
        flex-direction: column;
    }
    .prestige-column {
        width: 100%;
    }
}

.upgrade-tier-info {
    font-size: 0.8em;
    color: var(--bonus-color);
    font-weight: bold;
    margin: 4px 0;
    text-align: center;
    background-color: #e8f8f5;
    padding: 3px;
    border-radius: 4px;
}

.divine-powers-container {
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    justify-content: flex-start;
    padding: 0 0 100px 0;
}

.divine-powers-intro {
    padding: 0 40px 20px 40px;
    text-align: center;
    max-width: 700px;
    font-size: 1.1em;
    color: #555;
}

.divine-powers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1000px;
    padding: 0 40px 20px 40px;
}

.power-card {
    background-color: var(--panel-bg-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px var(--shadow-color);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.power-icon { font-size: 3.5em; margin-bottom: 10px; }
.power-name { font-weight: bold; font-size: 1.3em; margin-bottom: 10px; }
.power-description { font-size: 0.9em; color: #555; margin-bottom: 15px; min-height: 40px; }

.power-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    background-color: #e67e22;
}

.power-btn:hover:not(:disabled) {
    background-color: #d35400;
}

.power-btn:disabled {
    background-color: #7f8c8d;
    cursor: not-allowed;
}

.power-cooldown-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.7);
    transform-origin: bottom;
    transform: scaleY(1);
    transition: transform 0.5s linear;
    pointer-events: none;
}

.prestige-upgrade-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.prestige-upgrade-info {
    text-align: left;
    flex-grow: 1;
    margin: 0 10px;
}

.prestige-upgrade-info strong {
    font-size: 1.1em;
}

.prestige-upgrade-info p {
    font-size: 0.85em;
    color: #555;
    margin: 4px 0 0 0;
}

.prestige-upgrade-buy-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    background-color: #e67e22;
    flex-shrink: 0;
}

.prestige-upgrade-buy-btn:disabled {
    background-color: #bdc3c7;
}

.hidden {
    display: none !important;
}

.power-btn { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }


#settings-btn {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--main-text-color);
    background-color: var(--panel-bg-color);
    font-size: 1.8em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

#settings-btn:hover {
    transform: scale(1.1) rotate(45deg);
}

.setting-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--background-color);
}
.setting-option label {
    font-weight: bold;
}

.danger-zone {
    border: 2px solid #e74c3c;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background-color: #f2dede;
}
.danger-zone h4 {
    color: #a94442;
    margin-bottom: 10px;
}
.danger-zone small {
    color: #7f8c8d;
}

.nav-btn.danger {
    background-color: #e74c3c;
    width: 100%;
    margin-bottom: 5px;
}
.nav-btn.danger:hover {
    background-color: #c0392b;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--bonus-color);
}
input:checked + .slider:before {
    transform: translateX(26px);
}


#notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.notification-toast {
    background-color: rgba(44, 62, 80, 0.9);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    animation: slideIn 0.5s ease-out forwards, fadeOut 0.5s ease-in 4.5s forwards;
    pointer-events: auto;
}

.notification-toast .icon {
    font-size: 1.5em;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.stat-card.full-width {
    grid-column: 1 / -1;
}

.stats-tabs {
    display: flex;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 20px auto;
}
.stats-tabs .tab-btn {
    border-radius: 0;
    border-bottom: 3px solid transparent;
}
.stats-tabs .tab-btn:first-child { border-top-left-radius: 8px; }
.stats-tabs .tab-btn:last-child { border-top-right-radius: 8px; }

.stats-tabs .tab-btn.active {
    border-color: var(--accent-color);
    background-color: #fff;
    color: var(--accent-color);
}
.stats-tabs .tab-btn:not(.active) {
    background-color: #f0f0f0;
}

.stats-tab-content { display: none; }
.stats-tab-content.active { display: block; }

.stats-grid.modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 0 40px;
}
.stats-grid.modern .stat-card.full-width {
    grid-column: 1 / -1;
}

.detailed-stats-list {
    list-style: none;
    padding: 0;
}
.detailed-stats-list li {
    display: flex;
    align-items: center;
    padding: 10px 5px;
    font-size: 1.1em;
    border-bottom: 1px solid var(--background-color);
}
.detailed-stats-list li:last-child {
    border-bottom: none;
}
.detailed-stats-list .icon {
    font-size: 1.5em;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}
.detailed-stats-list .label {
    flex-grow: 1;
    color: #555;
}
.detailed-stats-list .value {
    font-weight: bold;
    font-size: 1.1em;
}

.detailed-stats-list.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.upgrade-tier-info.epic {
    color: #8e44ad;
    background-color: #f4e8f8;
}

.prestige-upgrade-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.prestige-upgrade-info {
    text-align: left;
    flex-grow: 1;
    margin: 0 10px;
}

.prestige-upgrade-info strong {
    font-size: 1.1em;
}

.prestige-upgrade-info p {
    font-size: 0.85em;
    color: #555;
    margin: 4px 0 0 0;
}

.prestige-upgrade-buy-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    background-color: #e67e22;
    flex-shrink: 0;
}

.prestige-upgrade-buy-btn:disabled {
    background-color: #bdc3c7;
}

.polissage-modal-content {
    max-width: 500px;
}

#polissage-game-area {
    position: relative;
    margin: 20px auto;
    width: 300px;
    height: 300px;
    cursor: pointer;
    background-color: #f0f0f0;
    border-radius: 15px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#polissage-head {
    font-size: 120px;
    user-select: none;
    transition: transform 0.05s ease;
}

#polissage-head.clicked {
    transform: scale(0.95);
}

#polissage-timer {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-color);
}

.shine-bar-container {
    width: 80%;
    height: 25px;
    background-color: #ddd;
    border-radius: 15px;
    border: 2px solid #ccc;
    position: absolute;
    bottom: 20px;
}

#shine-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f1c40f, #f39c12);
    border-radius: 12px;
    transition: width 0.1s linear;
}

.chasse-modal-content {
    max-width: 550px;
}

#chasse-game-ui {
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    padding: 0 20px;
    margin: 10px 0;
}

#chasse-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    width: 400px;
    height: 400px;
    margin: 15px auto;
    background-color: #a38162;
    padding: 15px;
    border-radius: 10px;
    border: 5px solid #6b4e2f;
}

.chasse-hole {
    background-color: #533c1f;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.chasse-head, .chasse-wig {
    font-size: 60px;
    position: absolute;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    user-select: none;
    transition: bottom 0.2s ease-out;
}

.chasse-head.up, .chasse-wig.up {
    bottom: 5px;
}

#esquive-game-area {
    width: 100%;
    max-width: 500px;
    height: 400px;
    background-color: #d4e6f1;
    border: 3px solid var(--accent-color);
    border-radius: 10px;
    margin: 15px auto;
    position: relative;
    overflow: hidden;
    cursor: none;
}

#esquive-player {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 50px;
    user-select: none;
}

.falling-object {
    position: absolute;
    top: -60px;
    font-size: 40px;
    user-select: none;
    animation: fall linear 5s;
}

#esquive-game-ui {
    display: flex;
    justify-content: space-between;
    font-size: 1.2em;
    padding: 0 20px;
    margin: 10px 0;
}

.prestige-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    padding: 20px;
}
.prestige-column.prestige-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.prestige-card h3 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--accent-color);
    border-bottom: 1px solid var(--background-color);
    padding-bottom: 10px;
}
.prestige-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}
.prestige-info-item {
    background-color: var(--background-color);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}
.prestige-info-item span {
    font-size: 0.9em;
    color: #555;
}
.prestige-info-item .stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
}
.prestige-info-item.gain {
    grid-column: 1 / -1;
    background: linear-gradient(45deg, #e8f8f5, #d6f5e3);
    border: 1px solid var(--bonus-color);
    color: #1a6840;
    padding: 15px;
    box-shadow: 0 0 15px rgba(39, 174, 96, 0.2);
}
.prestige-info-item.gain .stat-value {
    color: var(--bonus-color);
}

.prestige-bonus-list {
    list-style: none;
    padding: 0;
    max-height: 200px;
    overflow-y: auto;
}
.prestige-bonus-list li {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--background-color);
}
.prestige-bonus-list li:last-child {
    border-bottom: none;
}
.prestige-bonus-list .icon {
    font-size: 1.5em;
    margin-right: 10px;
}

.prestige-card {
    border: 1px solid #d7dbdd;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prestige-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

#prestige-button-confirm {
    background-color: #e67e22;
    padding: 15px;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 #c0392b;
    transition: all 0.1s ease;
}

#prestige-button-confirm:hover:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #c0392b;
    background-color: #d35400;
}

#prestige-button-confirm:disabled {
    background-color: #bdc3c7;
    box-shadow: 0 4px 0 #95a5a6;
}

.player-rank-display {
    text-align: center;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.leaderboard-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease;
}

.leaderboard-entry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.leaderboard-entry.rank-1 {
    background: linear-gradient(45deg, #FFD700, #FFF8DC);
    border-color: #FFC107;
}

.leaderboard-entry.rank-2 {
    background: linear-gradient(45deg, #C0C0C0, #F8F9FA);
    border-color: #6C757D;
}

.leaderboard-entry.rank-3 {
    background: linear-gradient(45deg, #CD7F32, #F4E4BC);
    border-color: #E67E22;
}

.rank {
    font-weight: bold;
    font-size: 1.2em;
    width: 50px;
    text-align: center;
    color: #2c3e50;
}

.player-info {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid #ddd;
}

.player-name {
    font-weight: bold;
    color: #2c3e50;
}

.score-info {
    text-align: right;
    min-width: 150px;
}

.score {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--accent-color);
}

.details {
    font-size: 0.8em;
    color: #6C757D;
    margin-top: 2px;
}

.date {
    font-size: 0.7em;
    color: #95a5a6;
    margin-top: 2px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.google-btn {
    background-color: #DB4437 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.google-btn:hover {
    background-color: #C33D2E !important;
}

/* Amélioration du menu de Renaissance */
.prestige-container {
    justify-content: flex-start;
    align-items: center;
}

.prestige-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 100%;
    max-width: 900px;
    padding: 25px;
}

.prestige-card {
    width: 100%;
    border: 1px solid #d7dbdd;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.prestige-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.prestige-card.main-action {
    background: linear-gradient(135deg, #ffffff, #f7f9f9);
}

.prestige-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 20px 0;
}

.prestige-info-item {
    background-color: var(--background-color);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.prestige-info-item span {
    font-size: 0.9em;
    color: #555;
    font-weight: bold;
}

.prestige-info-item .stat-value {
    display: block;
    font-size: 1.6em;
    font-weight: bold;
    margin-top: 5px;
}

.prestige-info-item.gain {
    grid-column: 1 / -1;
    background: linear-gradient(45deg, #e8f8f5, #d6f5e3);
    border: 1px solid var(--bonus-color);
    color: #1a6840;
    padding: 15px;
    box-shadow: 0 0 15px rgba(39, 174, 96, 0.2);
}

.prestige-info-item.gain .stat-value {
    color: var(--bonus-color);
}

#prestige-button-confirm {
    background-color: #e67e22;
    padding: 15px;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 0 #c0392b;
    transition: all 0.1s ease;
}

#prestige-button-confirm:hover:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #c0392b;
    background-color: #d35400;
}

#prestige-button-confirm:disabled {
    background-color: #bdc3c7;
    box-shadow: 0 4px 0 #95a5a6;
}

#prestige-upgrades-container {
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

#devlogs-btn {
    position: fixed;
    top: 15px;
    right: 325px;
    z-index: 1001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--main-text-color);
    background-color: var(--panel-bg-color);
    font-size: 1.8em;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px var(--shadow-color);
}

#devlogs-btn:hover {
    transform: scale(1.1);
}

#devlogs-list {
    text-align: left;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 15px;
    margin-bottom: 20px;
}

.devlog-entry {
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.devlog-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.devlog-entry h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
}
.devlog-entry .devlog-date {
    font-size: 0.8em;
    font-weight: normal;
    color: #7f8c8d;
}
.devlog-entry ul {
    list-style-position: inside;
    padding-left: 5px;
}
.devlog-entry li {
    margin-bottom: 5px;
}

#devlogs-modal .modal-content {
    max-width: 600px;
    text-align: left;
}

#devlogs-list {
    position: relative;
    padding-left: 30px;
    max-height: 60vh;
    overflow-y: auto;
    margin: 20px 0;
    padding-right: 10px;
}

#devlogs-list::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 10px;
    bottom: 10px;
    width: 4px;
    background-color: var(--background-color);
    border-radius: 2px;
}

.devlog-entry {
    position: relative;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid #eee;
}

.devlog-entry::before {
    content: '';
    position: absolute;
    left: -29px;
    top: 12px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--accent-color);
    border: 3px solid #fff;
    z-index: 1;
}

.devlog-entry h3 {
    color: var(--accent-color);
    margin: 0;
    font-size: 1.3em;
}

.devlog-date {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 15px;
    display: block;
}

.devlog-entry ul {
    list-style: none;
    padding: 0;
}

.devlog-entry li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
    line-height: 1.4;
}

.devlog-icon {
    margin-right: 10px;
    margin-top: 2px;
}