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

html { font-size: 25px; }

body {
    background: #1a1a1a;
    color: #d4c5a9;
    font-family: Georgia, 'Times New Roman', serif;
    min-height: 100vh;
    padding: 10px;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid #4a3a2a;
    box-shadow: 0 0 20px rgba(0,0,0,0.7);
    padding: 25px 20px;
    border-radius: 6px;
    text-align: center;
}

/* Адаптив под телефон */
@media (max-width: 900px) {
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 15px !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
    }
    body {
        padding: 0 !important;
    }
}

@media (max-width: 600px) {
    html { font-size: 18px; }
    .container { padding: 12px !important; }
}

h1, h2, h3 {
    color: #f0c040;
    text-shadow: 2px 2px 3px black;
    margin-bottom: 20px;
    letter-spacing: 1px;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { margin: 12px 0; line-height: 1.5; }
a { color: #f0c040; text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; padding: 0; }

button, .btn, input[type="submit"], a.btn, a.button {
    display: block;
    width: 100%;
    margin: 12px 0;
    padding: 16px 20px;
    background: linear-gradient(to bottom, #3a3020, #2a2010);
    color: #f0c040;
    border: 1px solid #5a4a30;
    font-family: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 6px;
    text-shadow: 1px 1px black;
    box-shadow: 0 3px 6px rgba(0,0,0,0.6);
    transition: all 0.2s;
    text-align: center;
}
button:hover, .btn:hover, input[type="submit"]:hover, a.btn:hover {
    background: linear-gradient(to bottom, #5a4a30, #3a3020);
    border-color: #f0c040;
    color: #ffd700;
    text-decoration: none;
}
input, textarea, select {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    background: #1e1e1e;
    border: 1px solid #4a3a2a;
    color: #d4c5a9;
    font-family: inherit;
    font-size: 1rem;
    border-radius: 4px;
    outline: none;
}
input:focus, textarea:focus, select:focus {
    border-color: #f0c040;
    box-shadow: 0 0 8px rgba(240,192,64,0.4);
}
label { display: block; margin: 5px 0; color: #c0a060; text-align: left; }

.char-info { background: #1e1a12; border: 1px solid #4a3a2a; padding: 15px; margin: 15px 0; border-radius: 5px; text-align: center; }
.char-info p { margin: 8px 0; }

.equipment-grid { display: flex; flex-direction: column; gap: 8px; margin: 15px 0; }
.equipment-slot { background: #1e1a12; border: 1px solid #4a3a2a; padding: 8px 12px; border-radius: 4px; display: flex; align-items: center; justify-content: space-between; }
.slot-name { font-weight: bold; color: #d4c5a9; min-width: 80px; }
.slot-item-link { background: none; border: none; padding: 0; font-size: 0.85rem; color: inherit; text-decoration: none; cursor: pointer; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.slot-item-link:hover { text-decoration: underline; color: #ffd700; }
.empty-slot { font-size: 0.8rem; color: #6a6a6a; font-style: italic; }

.error { background: #3a1a1a; border: 1px solid #6a2a2a; color: #faa; padding: 12px; margin: 15px 0; border-radius: 5px; text-align: center; }

.back-link { margin-top: 20px; display: inline-block; }

.flex-container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.flex-container form { flex: 1 1 250px; text-align: center; }

.shop-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.shop-controls a, .shop-controls button { padding: 8px 14px; background: #2a2015; border: 1px solid #4a3a2a; color: #d4c5a9; border-radius: 4px; text-decoration: none; font-size: 0.9rem; }
.shop-controls a.active, .shop-controls button.active { background: #4a3a20; border-color: #f0c040; color: #ffd700; }
.shop-item { background: #1e1a12; border: 1px solid #4a3a2a; padding: 12px; margin: 8px 0; border-radius: 5px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.shop-item-info { flex: 1; }
.shop-item-name { font-weight: bold; font-size: 1.1rem; }
.shop-item-desc { font-size: 0.9rem; color: #b0a080; }
.shop-item-price { margin-top: 5px; }
.shop-item-buy { margin-left: 15px; }

.btn-sm { padding: 5px 10px; font-size: 0.8rem; border: none; background: #2a2015; color: #d4c5a9; cursor: pointer; border-radius: 3px; }
.btn-sm:hover { background: #3a3020; color: #ffd700; }

.rarity-common { color: #9d9d9d; }
.rarity-rare { color: #4d94ff; }
.rarity-epic { color: #b366ff; }
.rarity-legendary { color: #ff8c00; }
.rarity-mythic { color: #ff4444 !important; font-weight: bold; text-shadow: 0 0 5px #ff2222; }

.location-lore { background: #1e1a12; border: 1px solid #4a3a2a; padding: 15px; margin-bottom: 20px; border-radius: 5px; font-style: italic; }

/* Анимации цветов ника */
@keyframes bloody { 0%{color:#ff0000;} 50%{color:#cc0000;text-shadow:0 0 15px #ff4444;} 100%{color:#ff0000;} }
@keyframes fire { 0%{color:#ff0000;} 25%{color:#ff6600;} 50%{color:#ffff00;} 75%{color:#ff6600;} 100%{color:#ff0000;} }
@keyframes ice { 0%{color:#00ffff;} 50%{color:#ffffff;} 100%{color:#00ffff;} }
@keyframes poison { 0%{color:#00ff00;} 50%{color:#88ff00;} 100%{color:#00ff00;} }
@keyframes dark { 0%{color:#6600cc;} 50%{color:#330066;} 100%{color:#6600cc;} }
@keyframes holy { 0%{color:#ffffff;} 50%{color:#ffffcc;} 100%{color:#ffffff;} }
@keyframes chaos { 0%{color:#ff0000;} 25%{color:#00ff00;} 50%{color:#0000ff;} 75%{color:#ff00ff;} 100%{color:#ff0000;} }
@keyframes golden { 0%{color:#ffd700;} 50%{color:#fff4a3;text-shadow:0 0 20px #ffd700;} 100%{color:#ffd700;} }
@keyframes neon { 0%{color:#39ff14;} 50%{color:#00ff00;text-shadow:0 0 20px #39ff14;} 100%{color:#39ff14;} }
@keyframes legendary { 0%{color:#ff0000;} 16%{color:#ff8800;} 33%{color:#ffff00;} 50%{color:#00ff00;} 66%{color:#0088ff;} 83%{color:#8800ff;} 100%{color:#ff0000;} }
@keyframes numenor { 0%{color:#ffd700;text-shadow:0 0 10px #ffd700;} 25%{color:#ff0088;text-shadow:0 0 15px #ff0088;} 50%{color:#00ffff;text-shadow:0 0 15px #00ffff;} 75%{color:#8800ff;text-shadow:0 0 15px #8800ff;} 100%{color:#ffd700;text-shadow:0 0 10px #ffd700;} }

.color-bloody { animation: bloody 2s infinite; -webkit-animation: bloody 2s infinite; }
.color-fire { animation: fire 1.5s infinite; -webkit-animation: fire 1.5s infinite; }
.color-ice { animation: ice 2s infinite; -webkit-animation: ice 2s infinite; }
.color-poison { animation: poison 1.5s infinite; -webkit-animation: poison 1.5s infinite; }
.color-dark { animation: dark 2s infinite; -webkit-animation: dark 2s infinite; }
.color-holy { animation: holy 2s infinite; -webkit-animation: holy 2s infinite; }
.color-chaos { animation: chaos 2s infinite; -webkit-animation: chaos 2s infinite; }
.color-golden { animation: golden 2s infinite; -webkit-animation: golden 2s infinite; }
.color-neon { animation: neon 1s infinite; -webkit-animation: neon 1s infinite; }
.color-legendary { animation: legendary 3s infinite; -webkit-animation: legendary 3s infinite; }
.color-numenor { animation: numenor 3s infinite; -webkit-animation: numenor 3s infinite; }

@media (max-width: 600px) {
    html { font-size: 18px; }
    .container { padding: 15px; }
}

/* Унификация контейнеров */
.container,
div.container {
    max-width: 800px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 25px 20px !important;
    font-size: 1rem !important;
}

/* Для широких страниц (инвентарь, магазин, рейтинг) */
.container[style*="1080px"],
.container[style*="1200px"],
.container[style*="900px"] {
    max-width: 800px !important;
}
