body {
    background-color: #1a1a1a;
    color: white;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    padding-top: 50px;
    margin: 0;
}

#main-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 20px;
    width: 95%;
    max-width: 1300px;
    margin: 0 auto;
}

#game-container {
    flex: 1;
    max-width: 600px;
    background-color: #333;
    padding: 20px;
    border: 3px solid #555;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hidden { display: none !important; }
.hidden-popup { display: none !important; }

button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 15px 32px;
    margin: 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    transition: background-color 0.2s;
}

button:hover:not(:disabled) { background-color: #45a049; }
button:disabled { background-color: #555 !important; color: #888; cursor: not-allowed; }

input[type="text"] {
    background-color: #222;
    border: 2px solid #555;
    color: white;
    padding: 10px;
    font-size: 16px;
    border-radius: 5px;
    width: 80%;
    margin-bottom: 20px;
    text-align: center;
}

#stats-bar {
    background: #222;
    padding: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid gold;
    border-radius: 5px;
    line-height: 1.6;
}

/* Dunkle, stylische Klassenkarten im RPG-Design */
#class-buttons-container {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
    margin-top: 15px;
}

.class-card {
    background: #222;
    border: 2px solid #555;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
}

.class-card:hover {
    border-color: gold;
    transform: scale(1.01);
    background: #2b2b2b;
}

.class-card h4 {
    margin: 0 0 5px 0;
    color: gold;
    font-size: 18px;
}

.class-card p {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: #bbb;
    font-style: italic;
    line-height: 1.4;
}

.class-stats-preview {
    font-size: 12px;
    font-weight: bold;
    color: #4CAF50;
    display: flex;
    gap: 20px;
    background: #111;
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #333;
}

/* Scrollbar für die Klassenliste */
#class-buttons-container::-webkit-scrollbar { width: 6px; }
#class-buttons-container::-webkit-scrollbar-track { background: #222; }
#class-buttons-container::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }

/* Popups & Shop */
#inventory-popup, #shop-popup {
    width: 380px;
    background-color: #222;
    border: 3px solid gold;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
}

/* Globaler Shop-Knopf oben links fixiert */
#shop-global-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 160px;
    padding: 12px;
    background-color: #9c27b0;
    z-index: 999;
    margin: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
#shop-global-btn:hover { background-color: #7b1fa2; }
#shop-close-btn { background-color: #555; width: 100%; margin-top: 10px; padding: 10px; }

#shop-items-container { max-height: 500px; overflow-y: auto; padding-right: 5px; }

.shop-item-wrapper { background: #2d2d2d; margin: 8px 0; border-radius: 5px; border: 1px solid #444; overflow: hidden; }
.shop-item-header { padding: 12px; cursor: pointer; text-align: left; transition: background-color 0.2s; }
.shop-item-header:hover { background-color: #383838; }
.shop-price { float: right; color: #4CAF50; font-weight: bold; }

/* Dropdown Animation */
.shop-dropdown {
    background: #1e1e1e;
    border-top: 1px solid #444;
    padding: 12px;
    font-size: 12px;
    color: #ddd;
    animation: slideDown 0.2s ease-out forwards;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
.dropdown-description { color: #aaa; font-style: italic; margin-bottom: 8px; display: block; }

.shop-action-area { margin-top: 10px; display: flex; gap: 5px; align-items: center; }
.shop-action-area input { flex: 1; padding: 6px; font-size: 12px; margin: 0; background: #333; color: white; border: 1px solid #555; }
.shop-action-area button { width: auto; margin: 0; padding: 6px 12px; font-size: 12px; background-color: #9c27b0; }

/* Avatar & Slots */
#character-screen { display: flex; gap: 15px; margin-bottom: 15px; background: #2b2b2b; padding: 10px; border-radius: 5px; }
#character-avatar { width: 90px; height: 160px; background: #252525; border: 2px solid #aaa; border-radius: 5px; position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 15px; box-sizing: border-box; }
#avatar-head { width: 30px; height: 30px; background: #ffcc99; border-radius: 50%; margin-bottom: 4px; transition: background-color 0.3s; }
#avatar-body { width: 50px; height: 50px; background: #555; border-radius: 4px 4px 0 0; margin-bottom: 2px; transition: background-color 0.3s; }
#avatar-legs { width: 38px; height: 38px; background: #444; border-radius: 2px; margin-bottom: 2px; transition: background-color 0.3s; }
#avatar-feet { width: 44px; height: 12px; background: #222; border-radius: 2px; transition: background-color 0.3s; }
#avatar-era-tag { position: absolute; bottom: 4px; font-size: 9px; background: #000; padding: 2px 5px; border-radius: 3px; color: gold; font-weight: bold; }

#equipment-slots { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.eq-slot { background: #1a1a1a; padding: 6px; border-radius: 4px; font-size: 11px; text-align: left; border-left: 3px solid #666; }
.slot-empty { color: #666; font-style: italic; }

#inventory-list { list-style-type: none; padding: 0; max-height: 280px; overflow-y: auto; }
#inventory-list li { padding: 10px; margin: 5px 0; background-color: #3a3a3a; border-left: 3px solid #4CAF50; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
#inventory-list li:hover { background-color: #454545; }
#inventory-list li.equipped-item { background-color: #1e3d22; border-right: 4px solid #4CAF50; }

.item-row-left { text-align: left; }
.item-row-right { text-align: right; font-size: 11px; font-weight: bold; }
.item-stats { display: block; font-size: 11px; color: #4CAF50; margin-top: 2px; }

.rarity-common       { color: #ffffff; }
.rarity-rare         { color: #0070dd; font-weight: bold; }
.rarity-epic         { color: #a335ee; font-weight: bold; }
.rarity-legendary    { color: #ff8000; font-weight: bold; }
.rarity-mythic       { color: #ff3333; font-weight: bold; text-shadow: 0 0 3px #ff3333; }
.rarity-package      { color: #00ffcc; font-weight: bold; text-shadow: 0 0 4px #00ffcc; }

#notification-container { position: fixed; left: 20px; top: 80px; z-index: 9999; }
.notification { background-color: #2b2b2b; border-left: 5px solid gold; padding: 15px; margin-bottom: 10px; animation: slideIn 0.5s ease forwards, fadeOut 0.5s ease 3.5s forwards; }

#combat-timer-container { margin: 20px auto; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.timer-box { position: relative; width: 80px; height: 80px; }
.timer-svg { transform: rotate(-90deg); }
.timer-bg { fill: none; stroke: #222; stroke-width: 6px; }
.timer-bar { fill: none; stroke: #ff3333; stroke-width: 6px; stroke-linecap: round; stroke-dasharray: 213.6; stroke-dashoffset: 0; transition: stroke-dashoffset 0.1s linear; }
#timer-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 22px; font-weight: bold; color: #ff3333; }

@keyframes slideIn { from { transform: translateX(-120%); } to { transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; } }