/* styles.css — Modernized Design v5 (Fixed 4+4 Side Slots, No Top/Bottom) — MOBILE-SAFE VERSION */

:root {
    --heaven-gold: #FFD700;
    --hell-red: #8B0000;
    --neutral-gray: #8B8B8B;
    --dark-bg: #0a0a0a;
    --gradient-start: #0a0000;
    --gradient-middle: #1a0000;
    --gradient-end: #000033;
}

html {
  background: linear-gradient(
    to bottom,
    var(--gradient-start),
    var(--gradient-middle),
    var(--gradient-end)
  );
}

body {
  background: transparent !important;
  margin: 0 auto;
  text-align: center;
  width: 410px;
  max-width: 100%;
  padding: 0px;
  box-sizing: border-box;
  color: #e6e6e6;
  font-size: 15px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  word-wrap: break-word;
}

.teac {
  display: block;
  color: #c0c0c0;
  font-size: 13px;
  border: 1px solid #2a2a2a;
  background: #202024;
  padding: 10px;
  text-decoration: none;
  border-radius: 8px;
  margin: 0px 0;
  transition: all 0.2s ease;
}
.teac:hover {
  background: #2a2a2e;
  border-color: #3a3a3a;
  /* transform и box-shadow удалены — нестабильно на мобиле */
}

.header {
  background: rgba(29, 29, 29, 0.8);
  /* backdrop-filter удален */
  border: 1px solid rgba(42, 42, 46, 0.5);
  border-radius: 10px;
  padding: 14px;
  margin: 14px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  color: #ffffff;
  font-weight: 600;
}

hr {
  border: none;
  border-bottom: 1px solid #2a2a2e;
  width: 100%;
  margin: 10px 0;
}

.exp_polos {
  background: #393131;
  margin: 0;
  padding: 0px 0;
  border-radius: 8px;
  overflow: hidden;
}

.exp_polos .progress {
  background-color: #ffcc00;
  height: 10px;
  border-radius: 5px;
  transition: width 0.3s ease;
}

input[type="submit"] {
  margin: 0px auto 0px;
  display: block;
  border: 1px solid #1a1a1a;
  background: #ffcc00;
  background-size: contain;
  text-align: center;
  font-weight: bold;
  color: #000;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s ease;
}
input[type="submit"]:hover {
  background-color: #ffdd33;
  /* transform и box-shadow удалены */
}

.oh {
  float: left;
  padding: 0 0px 0 0;
  margin: 0;
  vertical-align: middle;
}

a {
  color: #e6e6e6;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: #ffcc00;
}

img {
  border: 0;
  vertical-align: middle;
  max-width: 70%;
  height: auto;
  border-radius: 0px;
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

.left {
  text-align: left;
}

a.link {
  background: rgb(0 0 0 / 62%);
  /* backdrop-filter удален */
  border: 1px solid rgba(42, 42, 42, 0.71);
  border-radius: 8px;
  padding: 8px;
  margin: 2px 0;
  color: #e6e6e6;
  text-decoration: none;
  display: block;
  transition: all 0.2s ease;
}

a.link:hover {
  background: rgba(42, 42, 46, 0.9);
  border-color: #ffcc00;
  /* box-shadow удален */
}

a.des {
  text-decoration: none;
  display: block;
  padding: 5px;
  background: rgba(32, 32, 35, 0.14);
  border: 1px solid #2a2a2e;
  border-radius: 8px;
  min-height: 24px;
  color: #e6e6e6;
  margin: 8px 0;
  transition: all 0.2s ease;
}
a.des:hover {
  background: #2a2a2d;
  /* box-shadow удален */
}

a.but {
  text-decoration: none;
  display: inline-block;
  min-height: 40px;
  background: #ffd6003b;
  background-size: contain;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  color: #000;
  font-weight: bold;
  font-size: 16px;
  padding: 10px 20px;
  text-align: center;
  margin: 10px 0;
  cursor: pointer;
  transition: all 0.25s ease;
}
a.but:hover {
  background-color: #ffdd33;
  /* transform и box-shadow удалены */
}

.de {
  background: rgb(0 0 0 / 62%);
  /* backdrop-filter и -webkit-backdrop-filter удалены */
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 10px;
  margin: 2px 0;
  color: #ffffffbd;
  position: relative;
  z-index: 1;
  overflow: visible;
}

input[type="text"],
input[type="password"] {
  background: #1a1a1a url("/design/inputext.png") no-repeat right 10px center;
  background-size: 20px;
  border: 1px solid #444;
  color: #fff;
  padding: 12px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  margin: 8px 0;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #ffcc00;
  box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.25);
}

.head {
  background: #202028;
  color: #ccc;
  width: 100%;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  margin: 14px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.head a {
  display: inline-block;
  padding: 16px 0;
  background: #202028;
  float: left;
  width: 33.333%;
  text-align: center;
  margin: 0;
  color: #e6e6e6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  border-right: 1px solid #2a2a2a;
  box-sizing: border-box;
}
.head a:last-child {
  border-right: none;
}
.head a:hover {
  background: #2a2a2e;
  color: #ffcc00;
}

/* .stat-item:hover полностью удален */

/* .stat-item:hover img удален */

.hero-info-container {
  display: flex;
  gap: 15px;
  margin: 15px 0;
  width: 100%;
  box-sizing: border-box;
}

.info-block {
  background: rgba(30, 30, 40, 0.8);
  /* backdrop-filter удален */
  border: 1px solid rgba(42, 42, 46, 0.5);
  border-radius: 12px;
  padding: 15px;
  box-sizing: border-box;
}

.left-block {
  background: linear-gradient(145deg, rgba(30, 30, 38, 0.8), rgba(34, 34, 42, 0.8));
  /* backdrop-filter удален */
}

/* .info-item:hover полностью удален */

.resource-item {
  display: flex;
  align-items: center;
  gap: 0px;
  font-size: 14px;
  font-weight: 600;
  color: #e6e6e6;
}

.resource-item img {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* .compact-stat:hover и его вариации удалены */

/* .menu-item::before и :hover полностью удалены */

.menu-title {
  font-weight: 700;
  font-size: 16px;
  margin: 0 0 4px 0;
  color: #ffd27f;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.ultra-compact-bar {
  display: flex;
  align-items: center;
  background: rgba(30, 30, 40, 0.9);
  border: 1px solid #2a2a32;
  border-radius: 20px;
  padding: 6px 12px;
  margin: 3px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  gap: 8px;
}

.level-text {
  font-size: 13px;
  font-weight: 600;
  color: #ffcc00;
  white-space: nowrap;
}

.mini-exp-bar {
  flex: 1;
  height: 6px;
  background: rgba(50, 50, 60, 0.8);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid #353540;
}

.mini-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffcc00, #ff9900);
  border-radius: 2px;
  transition: width 0.3s ease;
  /* box-shadow удален */
}

.stats-inline {
  font-size: 12px;
  font-weight: 600;
  color: #e6e6e6;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* .stats-inline img filter удален */

.compact-footer-info {
  background: rgba(30, 30, 35, 0);
  border-top: 1px solid rgba(255, 204, 0, 0.1);
  padding: 12px 15px;
  margin: 0 auto;
  max-width: 410px;
  border-radius: 15px 15px 0 0;
}

.resources-row {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 5px;
}

/* .resource-item уже определён выше */

.resource-value {
  color: #ffcc00;
}

.links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0px;
  font-size: 14px;
}

.links-row a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s ease;
}

.links-row a:hover {
  color: #ffcc00;
}

.separator {
  color: #555;
  font-weight: bold;
}

.promo-banner {
  text-align: center;
  margin: 8px 0;
  padding: 8px;
  background: rgba(255, 204, 0, 0.1);
  border-radius: 8px;
  border: 1px solid rgba(255, 204, 0, 0.2);
}

.promo-banner a {
  color: #ffcc00;
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
}

.time-text {
  color: #777;
  font-size: 12px;
}

.adven-card {
  display: flex;
  gap: 12px;
  background: rgb(0 0 0 / 29%);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 12px;
  border-radius: 0px;
  color: #e6e6e6;
  align-items: center;
}

.adven-body {
  flex: 1;
  text-align: left;
}

.adven-name {
  font-size: 18px;
  color: #ffd27f;
  font-weight: 700;
  margin-bottom: 6px;
}

.btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #111;
  font-weight: 700;
}

.btn-attack {
  background: linear-gradient(90deg, #ff7a7a, #ff3d3d);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
}

.btn-tasks {
  background: linear-gradient(90deg, #7fbfff, #3d9eff);
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
}

.progress {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ffd27f, #ffb86b);
  border-radius: 6px;
  transition: width .25s ease;
}

.task-row {
  margin-bottom: 8px;
}

a.link, a.but {
  text-decoration: none;
  color: inherit;
}

.hero-avatar-container {
  position: relative;
  width: 100%;
  height: 320px; /* Фиксированная высота */
  margin: 0px auto;
  max-width: 410px; /* Максимальная ширина */
  /* УДАЛЯЕМ фон пьедестала */
  /* background: url('/icons/menu_bg/pedestal.jpeg') no-repeat; */
  /* background-position: center -130px; */
  /* background-size: auto; */
  border-radius: 0px;
  overflow: hidden; /* Важно для обрезки контента */
  box-shadow: none;
}

.avatar-video {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ключевое свойство - обрезает видео чтобы заполнить контейнер */
  object-position: center; /* Центрируем видео при обрезке */
  border-radius: 0px;
}

.hero-portrait {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  /* УДАЛЯЕМ transform так как теперь занимает всю область */
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Для фолбэк изображения тоже используем cover */
  object-position: center;
  max-width: none;
}

/* Остальные стили для слотов остаются без изменений */
.slot-img {
  position: absolute;
  width: 82px;
  height: 64px;
  object-fit: contain;
  z-index: 10;
}

.slot-img.left-1 { top: 0; left: -10px; }
.slot-img.left-2 { top: 64px; left: -10px; }
.slot-img.left-3 { top: 128px; left: -10px; }
.slot-img.left-4 { top: 192px; left: -10px; }
.slot-img.left-5 { top: 256px; left: -10px; }

.slot-img.right-1 { top: 0; right: -10px; }
.slot-img.right-2 { top: 64px; right: -10px; }
.slot-img.right-3 { top: 128px; right: -10px; }
.slot-img.right-4 { top: 192px; right: -10px; }
.slot-img.right-5 { top: 256px; right: -10px; }

html, body {
  background: transparent !important;
}

html::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    var(--gradient-start),
    var(--gradient-middle),
    var(--gradient-end)
  );
  z-index: -2;
}
/* ============ СТИЛИ ДЛЯ КЛАНОВОГО ЧАТА ============ */
.chat-bubble {
    padding: 12px;
    border-radius: 12px;
    background: rgb(55 24 24 / 40%);
    border: 1px solid rgba(42, 42, 46, 0.4);
    margin: 2px 0;
}

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    flex-wrap: wrap;
    gap: 8px;
}

.chat-nick {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #ffd27f;
    text-decoration: none;
    font-size: 15px;
}

.chat-nick img {
    width: 16px;
    height: 16px;
    border-radius: 50%;
}

.chat-time {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

.chat-reply {
    font-size: 12px;
    color: #ffcc00;
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid rgba(255, 204, 0, 0.2);
    transition: all 0.2s ease;
}

.chat-reply:hover {
    background: rgba(255, 204, 0, 0.2);
    color: #fff;
}

.chat-message {
    font-size: 14px;
    color: #e6e6e6;
    line-height: 1.5;
    word-break: break-word;
}

.chat-message b {
    color: #ffcc00;
}

.background-video-container {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 410px;        /* ← ФИКСИРОВАННАЯ ШИРИНА, как у body */
  height: 100vh;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  opacity: 0.45;
}

/* ============ СТИЛИ ДЛЯ КЛАНОВЫХ СТРОЕНИЙ ============ */
.clan-building-link {
    display: block;
    text-decoration: none;
    color: inherit;
    margin: 4px 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.clan-building {
    width: 100%;
    height: 85px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.clan-building-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* затемнение фона */
    display: flex;
    align-items: center;
    justify-content: center;
}
.clan-building-content {
    text-align: center;
    color: #ffee04;
    font-size: 15px;
    line-height: 1.4;
    padding: 0 10px;
}
.clan-building-content div {
    margin: 0px 0;
}

.full-width-img {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    background: #000000d6;
    border: 1px solid #613333;
    border-radius: 6px;
    padding: 10px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Аватар БЕЗ рамки — например, у системных сообщений или если рамки нет */
.mini-avatar-alone {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 4px;
    object-fit: cover;
    display: block;
}

.message-time {
    color: #888;
    font-size: 0.85em;
}

.message-body {
    line-height: 1.4;
    margin-left: 0;
    padding-left: 0;
    text-align: left;
}

/* Контейнер для аватара С РАМКОЙ */
.mini-frame {
    position: relative;
    display: inline-block;
    width: 28px;
    height: 28px;
    vertical-align: middle;
    flex-shrink: 0;
}

.mini-frame .mini-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-width: 100% !important;
}

.mini-frame .mini-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    max-width: 100% !important;
}

.menu-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #5d2525;
    font-size: 11px;
    border-radius: 0 7px 0 7px;
    color: #FFFFFF;
    padding: 1px 0.9em;
    z-index: 2;
    line-height: 1.2;
}
.menu-badge-energy {
    background-color: #255d25 !important; /* Зеленоватый цвет вместо #5d2525 */
    color: #ffffff !important;
}

@keyframes subtlePulse {
  0%, 100% { background-color: transparent; }
  50% { background-color: rgba(255, 200, 200, 0.15); }
}
.pulse-unread {
  animation: subtlePulse 2.5s infinite;
  border-radius: 4px;
  display: inline-block;
  padding: 2px 4px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: #2a2a2a;
    border: 2px solid #ffd27f;
    border-radius: 8px;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.clan-header {
  position: relative;
}

.clan-icon {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 1;
}

.clan-info {
  text-align: center;
  position: relative;
  z-index: 2;
}