:root {
    --bg-primary: #1e1e1e;
    --bg-secondary: #252526;
    --text-light: #d4d4d4;
    --text-accent: #f1c40f; /* Gold */
    --color-click: #e74c3c; /* Rot */
    --color-success: #2ecc71; /* Grün */
    --color-info: #3498db; /* Blau */
    --color-error: #e74c3c; /* Rot */
    --font-primary: 'Inter', sans-serif; /* NEU: Moderne Schriftart */
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden; 
    /* NEU: Zentriert den vertikalen Container */
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* FIX: Neuer vertikaler Haupt-Container */
.container-vertical {
    background-color: var(--bg-secondary);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    max-width: 800px; /* Breiter für bessere Darstellung */
    width: 95%;
    border: 1px solid #3a3a3a;
    margin: 30px 0; /* Vertikaler Abstand */
    box-sizing: border-box;
}

/* Alle Hauptsektionen müssen nun die volle Breite nutzen */
.auth-box, .health-box, .stats-box, .click-area, 
.shop-box, .prestige-box, .leaderboard-box {
    margin-bottom: 25px; /* Abstand zwischen den Cards */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid #3a3a3a;
    background-color: #2d2d30; /* Hintergrundfarbe für alle Sektionen */
}

/* Spezifische Anpassungen */
.health-box, .stats-box, .prestige-box .stats-box {
    text-align: left;
    border-left: 5px solid var(--color-info);
    background-color: #2d2d30;
    padding: 20px;
    margin-bottom: 20px;
}
.prestige-box .stats-box {
    border-left: 5px solid var(--text-accent);
}

.leaderboard-box {
    background-color: #2d2d30;
    padding: 20px;
}


h1 {
    color: var(--text-accent);
    margin-bottom: 25px;
    font-size: 2.5em;
    font-weight: 900;
    text-shadow: 0 0 5px rgba(241, 196, 15, 0.3);
}

/* --- LEADERBOARD GRID FIX --- */
.leaderboard-box li {
    padding: 10px 15px;
    border-bottom: 1px solid #3a3a3a;
    /* FIX: Grid für 4 Spalten (Rank #, Name, Score, Klicks) */
    display: grid;
    grid-template-columns: 10% 40% 30% 20%; 
    align-items: center;
    font-size: 0.95em;
    transition: background-color 0.2s;
}

.leaderboard-header {
    font-weight: bold;
    background-color: #333;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
    color: var(--text-accent);
}
.rank-score {
    text-align: right;
    font-weight: bold;
    color: var(--text-light);
}
.rank-klicks {
    text-align: right;
    font-weight: normal;
    color: #888;
}

/* TOP 3 HIGHLIGHTS */
.leaderboard-box .rank-1 {
    background-color: #3b300f;
    color: var(--text-accent);
    border-radius: 6px;
    margin: 5px 0;
    font-weight: bold;
    border: 1px solid var(--text-accent);
    box-shadow: 0 0 5px var(--text-accent);
}
.leaderboard-box .rank-1 .rank-score,
.leaderboard-box .rank-1 .rank-klicks {
    color: var(--text-accent);
}
.leaderboard-box .rank-2 {
    color: silver;
}
.leaderboard-box .rank-2 .rank-score,
.leaderboard-box .rank-2 .rank-klicks {
    color: silver;
}
.leaderboard-box .rank-3 {
    color: #cd7f32;
}
.leaderboard-box .rank-3 .rank-score,
.leaderboard-box .rank-3 .rank-klicks {
    color: #cd7f32;
}


/* --- RESTLICHE STYLES UNVERÄNDERT --- */

.health-bar-container {
    background-color: #444;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
.health-bar-fill {
    height: 100%;
    width: 100%; 
    background-color: var(--color-success);
    transition: width 0.3s ease-out, background-color 0.5s;
    position: absolute;
    top: 0;
    left: 0;
}
.health-value-text {
    position: absolute;
    width: 100%;
    text-align: center;
    line-height: 30px;
    font-weight: bold;
    color: #1e1e1e;
    z-index: 10;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}
.stats-box p {
    font-size: 1.1em;
    margin: 8px 0;
    display: flex;
    justify-content: space-between;
}
#totalSchlaege {
    font-weight: bold;
    color: var(--color-success);
    font-size: 2.5em;
    display: block;
    margin-top: 10px;
    text-align: center;
}
.click-area {
    position: relative;
    margin-bottom: 30px;
    min-height: 280px; 
    display: flex;
    justify-content: center;
    align-items: center;
}
.enes-image {
    width: 220px;
    height: 220px;
    background-image: url('enesclicker.png'); 
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    margin: 30px auto;
    cursor: pointer;
    border: 8px solid var(--color-click);
    box-shadow: 0 0 25px rgba(231, 76, 60, 0.5);
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out;
}
.enes-image:active {
    transform: scale(0.95);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.9);
}
.enes-grave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background-color: #5a5a5a;
    border: 10px solid #333;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-family: serif;
    color: #1e1e1e;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 10; 
}
.enes-grave h2 {
    color: #1e1e1e;
    margin-bottom: 5px;
    border-bottom: 2px solid #1e1e1e;
}
.enes-grave button {
    background-color: var(--color-success);
    color: white;
    font-weight: bold;
    margin-top: 15px;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: background-color 0.2s;
}
.enes-grave button:hover {
    background-color: #27ae60;
}
.shop-box {
    text-align: left;
}
.upgrade {
    background-color: #333333;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 3px solid var(--text-accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}
.upgrade:hover {
    background-color: #3d3d3d;
}
.upgrade h3 {
    margin: 0 0 5px 0;
    color: var(--text-accent);
    font-size: 1.1em;
    border-bottom: none;
}
.upgrade p {
    margin: 0;
    font-size: 0.9em;
    color: #b0b0b0;
}
.upgrade-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.upgrade button {
    background-color: var(--color-info);
    color: white;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 8px;
}
.upgrade button:hover:not(:disabled) {
    background-color: #2980b9;
}
.upgrade button:disabled {
    background-color: #555;
    cursor: not-allowed;
    opacity: 0.6;
}
.auth-box {
    text-align: center;
}
.auth-box input {
    padding: 10px;
    margin: 5px;
    border-radius: 4px;
    border: 1px solid #555;
    background-color: #444;
    color: var(--text-light);
    width: 80%;
    max-width: 250px;
}
.auth-box button {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    border-radius: 4px;
    background-color: #e67e22; 
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}
.auth-box button:hover {
    background-color: #d35400;
}
.auth-box .logout-btn {
    background-color: var(--color-click);
}
.auth-box .logout-btn:hover {
    background-color: #c0392b;
}
.autosave-info {
    font-size: 0.8em;
    color: #888;
    margin-top: 10px;
}
#statList li {
    padding: 5px 0;
    justify-content: space-between;
    display: flex;
}
.leaderboard-box ul {
    list-style: none;
    padding: 0;
    text-align: left;
}
.leaderboard-box li:last-child {
    border-bottom: none;
}
.rank-number {
    font-weight: bold;
    color: #888;
}
.rank-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- TOAST NOTIFICATIONS --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}
.toast {
    background-color: #333;
    color: white;
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    opacity: 1;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.toast.hide {
    opacity: 0;
    transform: translateX(100%);
}
.toast.success { background-color: var(--color-success); }
.toast.error { background-color: var(--color-error); }
.toast.info { background-color: var(--color-info); }