/* ============================================================
   Битва Титанов — компактный серо-стальной средневековый стиль.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&display=swap');

/* ---------- Переменные ---------- */
:root {
    --bg-deep:      #14151a;
    --bg-panel:     #1c1e24;
    --bg-panel-2:   #23262d;
    --bg-input:     #0f1013;

    --border-dark:   #2a2d34;
    --border-silver: #3f434c;
    --border-iron:   #33363d;

    --text-main:    #c4c7ce;
    --text-dim:     #868a93;
    --text-muted:   #5a5e66;
    --text-bright:  #e8eaee;

    --silver:        #b0b4bd;
    --silver-bright: #d8dce3;
    --silver-dim:    #737780;

    --blood:         #6a2f38;
    --blood-bright:  #a04a54;

    --moss:          #4a5648;
    --moss-bright:   #6d7c66;

    --shadow-soft:  0 1px 4px rgba(0, 0, 0, 0.6);
    --shadow-deep:  0 2px 12px rgba(0, 0, 0, 0.8);
    --glow-silver:  0 0 8px rgba(176, 180, 189, 0.35);
    --glow-blood:   0 0 8px rgba(106, 47, 56, 0.5);
}

/* ---------- Сброс ---------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

/* ---------- Основа ---------- */
body {
    font-family: Verdana, Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-main);
    background-color: #0a0b0d;
    background-image:
        radial-gradient(ellipse at top,    rgba(70, 74, 84, 0.10) 0%, transparent 55%),
        radial-gradient(ellipse at bottom, rgba(30, 32, 38, 0.20) 0%, transparent 55%);
    background-attachment: fixed;
    text-shadow: #000 0 -1px 1px;
    margin: 0 auto;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--silver);
    text-decoration: underline;
    outline: 0;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

a:hover,
a:active {
    color: var(--silver-bright);
    text-shadow: var(--glow-silver);
    text-decoration: none;
}

img {
    border: 0;
    max-width: 100%;
    vertical-align: middle;
}

b, strong {
    color: var(--text-bright);
    font-weight: 700;
}

small { font-size: 90%; }
p { margin: 4px 0; }
hr {
    border: 0;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid #2f333a;
    margin: 5px 0;
}

ul, li {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1 {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--silver-bright);
    margin: 4px 0;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

h2 {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--silver-bright);
    margin: 4px 0;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

h3 {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--silver);
    margin: 3px 0;
}

/* ============================================================
   ОБЁРТКА
   ============================================================ */
.page {
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    background:
        linear-gradient(180deg, rgba(28, 30, 36, 0.55) 0%, rgba(20, 21, 26, 0.95) 100%),
        var(--bg-deep);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    border-left: 1px solid rgba(63, 67, 76, 0.25);
    border-right: 1px solid rgba(63, 67, 76, 0.25);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.85);
}

.page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--silver-dim) 20%,
        var(--silver-bright) 50%,
        var(--silver-dim) 80%,
        transparent 100%);
    box-shadow: 0 0 8px rgba(176, 180, 189, 0.4);
    z-index: 10;
}

/* ============================================================
   ШАПКА
   ============================================================ */
.head {
    background: linear-gradient(180deg, #23252c 0%, #17181d 100%);
    border-bottom: 1px solid var(--border-silver);
    padding: 6px 8px;
    font-size: 12px;
    overflow: hidden;
    position: relative;
}

.head b {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--silver-bright);
    text-shadow: var(--glow-silver);
}

.head img {
    vertical-align: middle;
    height: 12px;
}

/* Название игры — ссылка на главную */
.head-title {
    float: left;
    text-decoration: none !important;
    color: inherit;
    display: inline-block;
    line-height: 1;
    padding: 2px 0;
}

.head-title:hover b {
    color: var(--silver-bright);
    text-shadow: 0 0 8px rgba(176, 180, 189, 0.6);
}

.head-stats {
    float: right;
    white-space: nowrap;
    line-height: 1;
    padding: 2px 0;
}

.head-sep {
    opacity: 0.35;
    margin: 0 3px;
    color: var(--silver-dim);
}

/* ---------- Иконка почты с бейджем в шапке ---------- */
.head-mail {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    text-decoration: none !important;
    margin-right: 2px;
}

.head-mail img {
    height: 14px;
    vertical-align: middle;
    filter: drop-shadow(0 0 3px rgba(96, 192, 96, 0.5));
    animation: headMailPulse 2s ease-in-out infinite;
}

.head-mail-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #6d7c66;
    color: #ffffff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 8px;
    min-width: 12px;
    text-align: center;
    border: 1px solid #c8e0b8;
    box-shadow: 0 0 6px rgba(109, 124, 102, 0.6);
    font-family: Verdana, Arial, sans-serif;
}

@keyframes headMailPulse {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(96, 192, 96, 0.5)); }
    50%      { filter: drop-shadow(0 0 8px rgba(96, 192, 96, 0.9)); }
}

/* ---------- Полоса опыта ---------- */
.exp-bar {
    background: #08090b;
    height: 3px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
}

.exp-bar-fill {
    background: linear-gradient(90deg,
        var(--moss) 0%,
        var(--moss-bright) 60%,
        #8a9678 100%);
    height: 100%;
    width: 0;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 6px rgba(109, 124, 102, 0.5);
    position: relative;
}

.exp-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(232, 234, 238, 0.3),
        transparent);
    animation: expShimmer 3s ease-in-out infinite;
}

@keyframes expShimmer {
    0%   { left: -100%; }
    100% { left: 100%; }
}

/* ============================================================
   ФУТЕР
   ============================================================ */
.foot {
    background: linear-gradient(180deg, #17181d 0%, #0f1013 100%);
    border-top: 1px solid var(--border-silver);
    padding: 6px 8px;
    font-size: 11px;
    overflow: hidden;
    color: var(--text-dim);
}

.foot a { color: var(--silver); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

.foot-logout-btn { float: right; }

.foot-logout-btn button {
    background: none;
    border: 1px solid var(--border-iron);
    border-radius: 3px;
    color: var(--text-dim);
    font-size: 10px;
    padding: 3px 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.foot-logout-btn button:hover,
.foot-logout-btn button:active {
    border-color: var(--blood);
    color: var(--blood-bright);
    box-shadow: 0 0 6px rgba(106, 47, 56, 0.4);
}

.foot-player { display: inline-block; }
.foot-player img { height: 14px; margin-right: 3px; }
.foot-player b { color: var(--silver-bright); }

.foot-money {
    text-align: center;
    margin-top: 4px;
    font-size: 11px;
}

.foot-money img { height: 10px; vertical-align: middle; }

.foot-sep { opacity: 0.3; margin: 0 3px; }

.foot-stats {
    text-align: center;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.5;
    padding: 3px 0;
}

.foot-stats a { color: var(--text-dim); }

.foot-logout {
    text-align: center;
    padding: 4px 0;
}

.foot-logout button {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 10px;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    padding: 2px;
}

.foot-logout button:hover {
    color: var(--blood-bright);
}

/* ============================================================
   КОНТЕЙНЕРЫ
   ============================================================ */
.main {
    padding: 6px 8px;
    overflow-x: hidden;
    background-color: #1a1c21;
}

.block,
.block_zero {
    background: linear-gradient(180deg, rgba(28, 30, 36, 0.85) 0%, rgba(22, 24, 28, 0.95) 100%);
    border: 1px solid var(--border-dark);
    border-radius: 3px;
    padding: 6px 8px;
    margin: 4px 0;
}

.block_zero {
    background: transparent;
    border: 0;
    padding: 4px 2px;
}

.content {
    background: linear-gradient(180deg, rgba(28, 30, 36, 0.85) 0%, rgba(22, 24, 28, 0.95) 100%);
    border: 1px solid var(--border-dark);
    border-radius: 3px;
    padding: 10px 10px;
    margin: 6px 0;
}

.title {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 13px;
    font-weight: 700;
    color: var(--silver-bright);
    padding: 4px 2px;
    border-bottom: 1px solid var(--border-silver);
    margin-bottom: 6px;
    text-align: center;
    letter-spacing: 1px;
}

/* ============================================================
   РАЗДЕЛИТЕЛИ
   ============================================================ */
.line {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--border-silver) 50%, transparent 100%);
    margin: 5px 0;
    opacity: 0.45;
}

.mini-line {
    height: 0;
    border-top: 1px solid var(--border-dark);
    margin: 4px 0;
    opacity: 0.7;
}

.separ {
    height: 0;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid #2f333a;
    margin: 8px auto;
    max-width: 50%;
}

.mb10 { height: 10px; }

/* ============================================================
   МЕНЮ
   ============================================================ */
.menuList {
    margin: 4px 0;
}

.menuList li {
    background: linear-gradient(180deg, rgba(30, 32, 38, 0.9) 0%, rgba(22, 24, 28, 0.95) 100%);
    border: 1px solid var(--border-dark);
    border-radius: 3px;
    margin-bottom: 4px;
    list-style: none;
    overflow: hidden;
    transition: all 0.25s ease;
}

.menuList li:last-child { margin-bottom: 0; }

.menuList li:hover {
    border-color: var(--silver-dim);
    background: linear-gradient(180deg, rgba(36, 38, 45, 0.95) 0%, rgba(28, 30, 36, 1) 100%);
}

.menuList li.no_b {
    background: transparent;
    border: 0;
}

.menuList li > a {
    display: block;
    padding: 6px 8px;
    color: var(--text-main);
    font-size: 12px;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.menuList li > a:hover {
    color: var(--silver-bright);
    padding-left: 12px;
    text-decoration: none;
}

.menuList li > a img {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    transition: transform 0.25s ease;
}

.menuList li > a:hover img {
    transform: scale(1.15);
}

.menuList li small {
    color: var(--text-muted);
    font-size: 10px;
    display: block;
    margin-top: 2px;
    font-style: italic;
}

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn {
    display: inline-block;
    background: linear-gradient(180deg, #3a3e46 0%, #23262d 100%);
    border: 1px solid var(--border-silver);
    border-radius: 3px;
    color: var(--silver-bright) !important;
    text-align: center;
    text-decoration: none !important;
    padding: 6px 14px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    user-select: none;
    min-height: 28px;
    line-height: 16px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    text-shadow: #000 0 -1px 1px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    max-width: 100%;
    word-wrap: break-word;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(216, 220, 227, 0.15), transparent);
    transition: left 0.5s ease;
}

.btn:hover {
    background: linear-gradient(180deg, #454952 0%, #2c2f37 100%);
    border-color: var(--silver-bright);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), var(--glow-silver);
}

.btn:hover::before { left: 100%; }
.btn:active {
    transform: translateY(1px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}
.btn:focus { outline: none; }

.btn .label {
    display: inline-block;
    padding: 0 2px;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.btn img {
    height: 12px;
    vertical-align: middle;
}

.btn.big {
    font-size: 13px;
    padding: 9px 22px;
    min-height: 34px;
    letter-spacing: 1.2px;
}

.btn-full {
    display: block;
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
}

.btn-wrap {
    text-align: center;
    margin: 10px 0;
}

/* ============================================================
   ФОРМЫ
   ============================================================ */
form { margin: 6px 0; }

label {
    display: block;
    margin: 6px 0;
    text-align: left;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 0.3px;
}

input.text,
input[type="text"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-iron);
    border-radius: 3px;
    color: var(--text-bright);
    padding: 6px 8px;
    font-size: 12px;
    font-family: Verdana, Arial, sans-serif;
    margin: 3px 0;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

input.text:focus,
input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    border-color: var(--silver);
    outline: none;
    background: #131418;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6), 0 0 8px rgba(176, 180, 189, 0.25);
}

input.text::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

textarea {
    min-height: 60px;
    resize: vertical;
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image:
        linear-gradient(180deg, #0f1013 0%, #131418 100%),
        url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b4bd' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 10px center;
    background-size: 100% 100%, 10px 10px;
    padding-right: 26px;
}

select option {
    background: var(--bg-panel);
    color: var(--text-main);
}

input[type="submit"],
button[type="submit"] {
    background: linear-gradient(180deg, #3a3e46 0%, #23262d 100%);
    border: 1px solid var(--border-silver);
    border-radius: 3px;
    color: var(--silver-bright);
    padding: 6px 16px;
    font-family: Verdana, Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    min-height: 28px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    letter-spacing: 0.5px;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    background: linear-gradient(180deg, #454952 0%, #2c2f37 100%);
    border-color: var(--silver-bright);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), var(--glow-silver);
}

input[type="submit"]:active,
button[type="submit"]:active {
    transform: translateY(1px);
}

/* ============================================================
   КАРТОЧКИ ВЫБОРА
   ============================================================ */
.choice-group {
    display: flex;
    gap: 5px;
    margin: 6px 0;
    flex-wrap: wrap;
}

.choice-card {
    flex: 1;
    min-width: 100px;
    display: block;
    cursor: pointer;
    text-align: center;
    padding: 8px 6px;
    background: linear-gradient(180deg, rgba(22, 24, 28, 0.9) 0%, rgba(14, 15, 18, 0.95) 100%);
    border: 1px solid var(--border-dark);
    border-radius: 3px;
    transition: all 0.2s ease;
    position: relative;
}

.choice-card:hover {
    border-color: var(--silver-dim);
    box-shadow: 0 0 8px rgba(176, 180, 189, 0.15);
}

.choice-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-card .label {
    display: block;
    color: var(--text-main);
    font-family: 'Cinzel', Georgia, serif;
    font-size: 11px;
    letter-spacing: 0.5px;
    margin: 0;
}

.choice-card .sub {
    display: block;
    color: var(--text-muted);
    font-size: 9px;
    margin-top: 2px;
    font-style: italic;
}

.choice-card input:checked ~ .label {
    color: var(--silver-bright);
    text-shadow: var(--glow-silver);
}

.choice-card:has(input:checked) {
    border-color: var(--silver);
    background: linear-gradient(180deg, rgba(40, 42, 48, 0.95) 0%, rgba(28, 30, 36, 1) 100%);
    box-shadow: 0 0 8px rgba(176, 180, 189, 0.3);
}

/* ============================================================
   FLASH-УВЕДОМЛЕНИЯ
   ============================================================ */
.flash {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 5px 8px;
    margin: 4px 0;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.4;
    animation: flashSlide 0.3s ease-out;
}

@keyframes flashSlide {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.flash-icon {
    font-size: 12px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}

.flash-text { flex: 1; }

.flash-error {
    background: rgba(64, 26, 30, 0.9);
    border: 1px solid var(--blood);
    color: #d8a8ae;
}
.flash-error .flash-icon { color: var(--blood-bright); }

.flash-success {
    background: rgba(30, 42, 30, 0.9);
    border: 1px solid var(--moss);
    color: #b0c0a8;
}
.flash-success .flash-icon { color: var(--moss-bright); }

.flash-warning {
    background: rgba(60, 52, 34, 0.9);
    border: 1px solid #6a5a3a;
    color: #d0c098;
}
.flash-warning .flash-icon { color: #b8a060; }

.flash-info {
    background: rgba(30, 36, 44, 0.9);
    border: 1px solid #3a4550;
    color: #a8b4c0;
}
.flash-info .flash-icon { color: #8aa0b0; }

/* ============================================================
   ЛЕНДИНГ
   ============================================================ */
.hero {
    text-align: center;
    margin: 4px 0;
    position: relative;
}

.hero img {
    border-radius: 3px;
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    max-height: 220px;
    object-fit: cover;
    border: 1px solid var(--border-silver);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(176, 180, 189, 0.05);
    animation: heroZoom 0.6s ease-out;
}

@keyframes heroZoom {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

.hero .logo {
    display: block;
    height: 34px;
    width: auto;
    margin: 6px auto 8px;
    border: 0;
    box-shadow: none;
    max-height: none;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(176, 180, 189, 0.4));
    animation: logoPulse 3.5s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(176, 180, 189, 0.4)); }
    50%      { filter: drop-shadow(0 0 14px rgba(176, 180, 189, 0.6)); }
}

.landing-title {
    text-align: center;
    padding: 4px 8px;
}

.landing-title h1 {
    font-size: 16px;
    margin: 4px 0;
    letter-spacing: 1.5px;
    animation: titleFadeIn 0.9s ease-out;
}

@keyframes titleFadeIn {
    from { opacity: 0; letter-spacing: 6px; }
    to   { opacity: 1; letter-spacing: 1.5px; }
}

.landing-title .medium {
    color: var(--text-dim);
    font-size: 11px;
    display: block;
    line-height: 1.4;
    font-style: italic;
}

.players-count {
    text-align: center;
    padding: 4px;
}

.players-count h2 {
    color: var(--silver-bright);
    font-size: 13px;
    letter-spacing: 0.5px;
    text-shadow: var(--glow-silver);
}

/* ============================================================
   ИСТОРИЯ (/start/) — занавес, плавный текст
   ============================================================ */
.story::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #050608;
    z-index: 9999;
    pointer-events: none;
    animation: curtainLift 2.2s ease-out forwards;
}

@keyframes curtainLift {
    0%   { opacity: 1; }
    40%  { opacity: 0.85; }
    70%  { opacity: 0.35; }
    100% { opacity: 0; visibility: hidden; }
}

.story {
    padding: 14px 12px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-main);
    text-align: justify;
    max-width: 440px;
    margin: 0 auto;
    position: relative;
}

.story .story-title {
    text-align: center;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 18px;
    color: var(--silver-bright);
    letter-spacing: 3px;
    margin-bottom: 16px;
    text-shadow: var(--glow-silver);

    opacity: 0;
    filter: blur(8px);
    transform: translateY(-6px);
    animation: storyReveal 1.2s ease-out 0.3s forwards;
}

.story p {
    margin: 8px 0;
    opacity: 0;
    filter: blur(5px);
    transform: translateY(6px);
    animation: storyReveal 1s ease-out forwards;
}

.story p:nth-of-type(1) { animation-delay: 1.3s; }
.story p:nth-of-type(2) { animation-delay: 2.4s; }
.story p:nth-of-type(3) { animation-delay: 3.5s; }
.story p:nth-of-type(4) { animation-delay: 4.6s; }
.story p:nth-of-type(5) { animation-delay: 5.7s; }
.story p:nth-of-type(6) { animation-delay: 6.8s; }

@keyframes storyReveal {
    0% { opacity: 0; filter: blur(5px); transform: translateY(6px); }
    60% { opacity: 0.8; filter: blur(1px); }
    100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

.story-continue {
    opacity: 0;
    filter: blur(4px);
    transform: translateY(6px);
    animation: storyReveal 1s ease-out 8s forwards;
    margin-top: 16px;
}

.story-continue .btn {
    animation: btnPulse 2.5s ease-in-out infinite;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7); }
    50%      { box-shadow: 0 2px 12px rgba(0, 0, 0, 0.8), 0 0 18px rgba(176, 180, 189, 0.45); }
}

/* ============================================================
   УТИЛИТЫ
   ============================================================ */
.center { text-align: center; }
.right  { text-align: right; }
.left   { text-align: left; }
.bold   { font-weight: 700; }
.small  { font-size: 90%; }
.medium { font-size: 95%; }

.grey   { color: var(--text-dim); }
.grey a { color: var(--text-dim); }
.green  { color: var(--moss-bright); }
.red    { color: var(--blood-bright); }
.yellow { color: var(--silver-bright); }
.dgreen { color: #90a090; }
.gold   { color: var(--silver-bright); text-shadow: var(--glow-silver); }

.fl   { float: left; }
.fr   { float: right; }
.clr  { clear: both; }

/* ============================================================
   ТАБЛИЦЫ
   ============================================================ */
table {
    border-collapse: collapse;
    width: 100%;
}

table td {
    padding: 3px 4px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(42, 45, 52, 0.5);
}

table tr:last-child td { border-bottom: 0; }

/* ============================================================
   МАНЕКЕН ПЕРСОНАЖА
   ============================================================ */
.maneken {
    display: inline-block;
    width: 120px;
    height: 160px;
    border-radius: 3px;
    background: #0a0b0d;
    margin: 4px auto;
    border: 1px solid var(--border-silver);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

/* ============================================================
   ПРОФИЛЬ — манекен + слоты экипировки по бокам
   ============================================================ */
.maneken-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
}

.maneken-center {
    flex-shrink: 0;
}

.maneken-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.maneken-slot {
    width: 42px;
    height: 42px;
    border: 1px solid var(--border-silver);
    border-radius: 3px;
    background: #0a0b0d;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.maneken-slot:hover {
    border-color: var(--silver-bright);
    box-shadow: 0 0 6px rgba(176, 180, 189, 0.3);
}

.maneken-slot img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    display: block;
}

/* ============================================================
   ИНВЕНТАРЬ (inv.php + equip.php)
   ============================================================ */
.inv-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--border-dark);
}

.inv-item:last-child { border-bottom: 0; }

.inv-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--border-silver);
    border-radius: 3px;
    background: #0a0b0d;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

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

.inv-name {
    font-weight: 700;
    font-size: 12px;
    line-height: 1.3;
    word-wrap: break-word;
}

.inv-stats {
    color: var(--moss-bright);
}

.inv-actions {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
}

.inv-form {
    display: block;
    margin: 0;
}

.inv-btn {
    display: inline-block;
    background: linear-gradient(180deg, #3a3e46 0%, #23262d 100%);
    border: 1px solid var(--border-silver);
    border-radius: 3px;
    color: var(--silver-bright);
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    min-width: 80px;
}

.inv-btn:hover {
    background: linear-gradient(180deg, #454952 0%, #2c2f37 100%);
    border-color: var(--silver-bright);
    box-shadow: 0 0 6px rgba(176, 180, 189, 0.3);
}

.inv-btn:active { transform: translateY(1px); }

.inv-btn-wear {
    background: linear-gradient(180deg, #3f5a3a 0%, #223022 100%);
    border-color: var(--moss-bright);
    color: #c8e0b8;
}

.inv-btn-wear:hover {
    background: linear-gradient(180deg, #4e7048 0%, #2c4028 100%);
    box-shadow: 0 0 6px rgba(109, 124, 102, 0.5);
}

.inv-btn-sell {
    background: linear-gradient(180deg, #5a3a3a 0%, #2c1e1e 100%);
    border-color: var(--blood);
    color: #e0b0b0;
}

.inv-btn-sell:hover {
    background: linear-gradient(180deg, #6a4848 0%, #3a2828 100%);
    border-color: var(--blood-bright);
    box-shadow: 0 0 6px rgba(106, 47, 56, 0.5);
}

.inv-btn-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #1a1c21;
    border-color: var(--border-dark);
    color: var(--text-muted);
}

.inv-btn-disabled:hover {
    background: #1a1c21;
    border-color: var(--border-dark);
    box-shadow: none;
}

/* ---------- Слоты (equip.php) ---------- */
.inv-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 2px;
    font-size: 12px;
    border-bottom: 1px solid rgba(42, 45, 52, 0.5);
}

.inv-slot:last-child { border-bottom: 0; }

.inv-slot-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--border-silver);
    border-radius: 3px;
    background: #0a0b0d;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.inv-slot-icon-empty {
    opacity: 0.35;
    border-color: var(--border-dark);
}

.inv-slot-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.inv-slot-name {
    color: var(--text-dim);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: auto;
    flex-shrink: 0;
}

.inv-slot-item {
    font-weight: 700;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inv-slot-empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 11px;
}

.inv-slot-form {
    flex-shrink: 0;
    margin: 0;
}

/* ---------- Массовая продажа ---------- */
.mass-sell-form { margin: 4px 0; }

.mass-sell-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: linear-gradient(180deg, #5a3a3a 0%, #2c1e1e 100%);
    border: 1px solid var(--blood);
    border-radius: 3px;
    color: #e0b0b0;
    font-family: Verdana, Arial, sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    gap: 8px;
}

.mass-sell-btn:hover {
    background: linear-gradient(180deg, #6a4848 0%, #3a2828 100%);
    border-color: var(--blood-bright);
    box-shadow: 0 0 8px rgba(106, 47, 56, 0.5);
}

.mass-sell-btn:active { transform: translateY(1px); }

.mass-sell-label { flex: 1; }

.mass-sell-info {
    flex-shrink: 0;
    font-size: 10px;
    opacity: 0.8;
    font-weight: 400;
}

/* ============================================================
   ТРЕНИРОВКА
   ============================================================ */
.train-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 2px;
    border-bottom: 1px solid rgba(42, 45, 52, 0.5);
}

.train-row:last-child { border-bottom: 0; }

.train-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.train-icon {
    width: 16px;
    height: 16px;
}

.train-label {
    font-size: 12px;
    color: var(--text-main);
}

.train-value {
    font-size: 13px;
    color: var(--silver-bright);
    margin-left: auto;
}

.train-level { font-size: 10px; }

.train-action { flex-shrink: 0; }

/* ============================================================
   МАГАЗИН
   ============================================================ */
.shop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid var(--border-dark);
}

.shop-item:last-child { border-bottom: 0; }

.shop-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--border-silver);
    border-radius: 3px;
    background: #0a0b0d;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

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

.shop-name {
    font-weight: 700;
    font-size: 12px;
    line-height: 1.3;
    word-wrap: break-word;
}

.shop-actions { flex-shrink: 0; }

/* ---------- Сетка комплектов 2×2 ---------- */
.complects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 6px 0;
}

.complect-card {
    display: block;
    background: linear-gradient(180deg, #2a2d34 0%, #1a1c21 100%);
    border: 2px solid #6a5a3a;
    border-radius: 5px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    position: relative;
}

.complect-card::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px; right: 3px; bottom: 3px;
    border: 1px solid rgba(201, 168, 96, 0.4);
    border-radius: 2px;
    pointer-events: none;
    z-index: 2;
}

.complect-card:hover {
    border-color: var(--silver-bright);
    box-shadow: 0 0 14px rgba(176, 180, 189, 0.4);
    transform: translateY(-2px);
}

.complect-card:active { transform: translateY(0); }

.complect-img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: #0a0b0d;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.complect-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.complect-card:hover .complect-img { transform: scale(1.04); }

.complect-title {
    text-align: center;
    padding: 6px 4px;
    font-family: 'Cinzel', Georgia, serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--silver-bright);
    background: linear-gradient(180deg, #2a1e12 0%, #1a1612 100%);
    border-top: 1px solid rgba(201, 168, 96, 0.4);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
    line-height: 1.2;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.complect-maneken-big {
    max-width: 100%;
    max-height: 340px;
    border: 1px solid var(--border-silver);
    border-radius: 3px;
    background: #0a0b0d;
}

/* ============================================================
   ЧАТ
   ============================================================ */
.chat-list { margin: 8px 0; }

.chat-msg {
    background: linear-gradient(180deg, rgba(28, 30, 36, 0.7) 0%, rgba(22, 24, 28, 0.85) 100%);
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 6px;
    animation: chatFadeIn 0.35s ease-out;
}

@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-msg:last-child { margin-bottom: 0; }

.chat-head {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    font-size: 11px;
    flex-wrap: wrap;
}

.chat-avatar {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 3px rgba(176, 180, 189, 0.2));
}

.chat-login {
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.chat-time {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 10px;
    flex-shrink: 0;
}

.chat-text {
    color: var(--text-main);
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ---------- Кнопка «Ответить» ---------- */
.chat-reply {
    display: inline-block;
    color: var(--text-muted);
    font-size: 10px;
    cursor: pointer;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 3px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    vertical-align: middle;
}

.chat-reply:hover,
.chat-reply:active {
    background: rgba(176, 180, 189, 0.12);
    border-color: var(--border-silver);
    color: var(--silver-bright);
}

/* ---------- Форма ввода + кнопка emoji ---------- */
.chat-input-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.chat-input-row .text {
    flex: 1;
    margin: 0;
}

.chat-smile-btn {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    background: linear-gradient(180deg, #3a3e46 0%, #23262d 100%);
    border: 1px solid var(--border-silver);
    border-radius: 4px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.chat-smile-btn:hover,
.chat-smile-btn:active {
    background: linear-gradient(180deg, #454952 0%, #2c2f37 100%);
    border-color: var(--silver-bright);
    box-shadow: 0 0 8px rgba(176, 180, 189, 0.3);
}

/* ---------- Панель emoji ---------- */
.chat-smiles-panel {
    display: none;
    grid-template-columns: repeat(10, 1fr);
    gap: 3px;
    padding: 8px;
    margin-top: 8px;
    background: linear-gradient(180deg, rgba(22, 24, 28, 0.95) 0%, rgba(14, 15, 18, 1) 100%);
    border: 1px solid var(--border-silver);
    border-radius: 4px;
    animation: chatSmileFadeIn 0.2s ease-out;
    max-height: 220px;
    overflow-y: auto;
}

.chat-smiles-panel.open { display: grid; }

@keyframes chatSmileFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-smile {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease, transform 0.1s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.chat-smile:hover,
.chat-smile:active {
    background: rgba(176, 180, 189, 0.15);
    transform: scale(1.15);
}

/* ============================================================
   ПОЧТА
   ============================================================ */
.mail-new {
    display: block;
    margin-top: 4px;
    background: linear-gradient(180deg, #3f5a3a 0%, #223022 100%);
    border: 1px solid var(--moss-bright);
    color: #c8e0b8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 3px 8px;
    border-radius: 3px;
    text-align: center;
    animation: mailNewPulse 2s ease-in-out infinite;
}

@keyframes mailNewPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(106, 124, 102, 0); }
    50%      { box-shadow: 0 0 8px rgba(106, 124, 102, 0.6); }
}

/* ---------- Статус сообщения (Отправлено / Прочитано / Не прочитано) ---------- */
.msg-status {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    vertical-align: middle;
    white-space: nowrap;
}

.msg-status.msg-read {
    color: #7a8a78;
    border: 1px solid #3a4a38;
    background: rgba(30, 40, 30, 0.5);
}

.msg-status.msg-sent {
    color: #90959e;
    border: 1px solid #3a3d44;
    background: rgba(30, 32, 38, 0.5);
}

.msg-status.msg-unread {
    color: #c8e0b8;
    border: 1px solid var(--moss-bright);
    background: linear-gradient(180deg, #3f5a3a 0%, #223022 100%);
    animation: mailNewPulse 2s ease-in-out infinite;
}

/* ============================================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ============================================================ */
@media (max-width: 460px) {
    .page {
        box-shadow: none;
        max-width: 100%;
        border-left: 0;
        border-right: 0;
    }
}

@media (max-width: 380px) {
    .maneken-block { gap: 5px; }
    .maneken-slot {
        width: 36px;
        height: 36px;
    }
    .maneken-slot img {
        width: 34px;
        height: 34px;
    }
    .maneken {
        width: 110px;
        height: 146px;
    }
    .chat-smiles-panel { grid-template-columns: repeat(8, 1fr); }
    .chat-smile {
        height: 30px;
        font-size: 20px;
    }
    .msg-status {
        font-size: 8px;
        padding: 1px 4px;
        margin-left: 3px;
    }
}

@media (max-width: 360px) {
    body { font-size: 12px; }
    .btn { font-size: 11px; padding: 5px 10px; }
    .btn.big { font-size: 12px; padding: 7px 16px; }
    .head { font-size: 11px; padding: 4px 6px; }
    .main { padding: 4px 6px; }
    .menuList li > a { padding: 5px 6px; font-size: 11px; }
    .story { font-size: 12px; padding: 12px 10px; }
    .story .story-title { font-size: 16px; }
}

@media (max-width: 340px) {
    .complects-grid { gap: 6px; }
    .complect-title {
        font-size: 10px;
        padding: 4px 2px;
        min-height: 26px;
    }
}

/* ---------- Сообщение адресовано мне ---------- */
.chat-text-to-me {
    color: #90d090;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(144, 208, 144, 0.35);
}

/* ---------- Иконка чата в шапке ---------- */
.head-chat img {
    filter: drop-shadow(0 0 3px rgba(176, 180, 189, 0.6));
    animation: headChatPulse 2s ease-in-out infinite;
}

@keyframes headChatPulse {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(176, 180, 189, 0.6)); }
    50%      { filter: drop-shadow(0 0 8px rgba(216, 220, 227, 0.9)); }
}

/* ---------- Кнопка «Удалить» (точная копия «Ответить») ---------- */
.chat-del-form {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    line-height: 1;
}

/* Специфичность > глобального button[type="submit"] */
button.chat-del[type="submit"] {
    display: inline-block;
    color: var(--blood-bright);
    font-size: 10px;
    font-family: inherit;
    font-weight: normal;
    line-height: normal;
    cursor: pointer;
    padding: 1px 6px;
    margin-left: 6px;
    border-radius: 3px;
    border: 1px solid transparent;
    background: none;
    min-height: 0;
    height: auto;
    width: auto;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    text-shadow: inherit;
    outline: 0;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
    vertical-align: middle;
}

button.chat-del[type="submit"]:hover,
button.chat-del[type="submit"]:active {
    background: rgba(106, 47, 56, 0.15);
    border-color: var(--blood);
    color: #e0a0a8;
    box-shadow: none;
    transform: none;
}