body {
  background-color: #121212;
  color: #fff;
  padding-top: 70px;
}

html, body {
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
}

.news-body p { margin-bottom: .9rem; color:#ddd; }
.news-body h2, .news-body h3 { margin-top:1.2rem; margin-bottom:.6rem; }
.news-body a { color:#ff6b6b; text-decoration: underline; }
.news-body ul { margin-bottom: .9rem; }
.news-body blockquote {
  margin: 1rem 0;
  padding: .65rem 1rem;
  border-left: 3px solid #ff4444;
  background: rgba(255,255,255,.05);
  color: #ddd;
}
.news-body pre {
  padding: 1rem;
  overflow-x: auto;
  border-radius: 8px;
  background: #0d0d0d;
}
.news-body code { color: #ff9b9b; }
.news-body .tg-spoiler {
  border-radius: 3px;
  background: #666;
  color: transparent;
  cursor: pointer;
  transition: color .15s ease;
}
.news-body .tg-spoiler:hover,
.news-body .tg-spoiler:focus { color: inherit; }

.has-fixed-header { padding-top: 70px; }
.navbar { background:#1e1e1e; }
.navbar-brand { color:#ff4444 !important; font-weight:700; }
.nav-link { color:#fff !important; }
.nav-link:hover { color:#ff4444 !important; }
.navbar {
  background: #1e1e1e;
}
.navbar-brand {
  color: #ff4444 !important;
  font-weight: bold;
}
.nav-link {
  color: #fff !important;
}
.nav-link:hover {
  color: #ff4444 !important;
}

/* Каталог */
.game-card {
  position: relative;
  background: #1e1e1e;
  border-radius: 15px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}
.game-img {
  height: 350px;
  object-fit: cover;
  width: 100%;
  background: #222;
}
.game-info {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.3), rgba(0,0,0,0));
  padding: 10px;
}
.game-info h5 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 5px rgba(0,0,0,.8);
}
.game-info p {
  margin: 0;
  font-size: .9rem;
  color: #ccc;
}

/* Фильтр */
.filter-panel {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
}
.filter-panel h5 {
  margin-bottom: 15px;
  color: #ff4444;
}

.latest-comments-panel {
  margin-bottom: 15px;
  padding: 20px;
  border-radius: 10px;
  background: #1a1a1a;
}
.latest-comments-panel h5 {
  margin-bottom: 15px;
  color: #ff4444;
}
.latest-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.latest-comment-item {
  display: block;
  padding: 11px 12px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  color: #fff;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.latest-comment-item:hover {
  transform: translateY(-1px);
  border-color: rgba(255,68,68,.45);
  background: rgba(255,68,68,.08);
  color: #fff;
}
.latest-comment-item strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .9rem;
}
.latest-comment-text {
  display: -webkit-box;
  overflow: hidden;
  color: #c8c8c8;
  font-size: .84rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.latest-comment-game {
  margin-top: 7px;
  color: #ff6b6b;
  font-size: .78rem;
  line-height: 1.25;
}
.btn-toggle {
  background: #2a2a2a;
  border: none;
  margin: 5px;
  color: #fff;
}
.btn-toggle.active {
  background: #ff4444;
  color: #fff;
}
.badge-toggle {
  display: inline-block;
  text-decoration: none;
  padding: 8px 15px;
  margin: 5px;
  border-radius: 20px;
  background: #2a2a2a;
  color: #fff;
  cursor: pointer;
  transition: .2s;
}
.badge-toggle.active {
  background: #ff4444;
  color: #fff;
}

/* Адаптив для фильтра */
@media (max-width: 991.98px) {
  .filter-col { display: none; }
  .filter-btn { display: block; margin-bottom: 15px; }
  .game-img { height: 250px; }
}
@media (min-width: 992px) {
  .filter-btn { display: none; }
}

/* Внутренняя страница */
.container-narrow { max-width: 1000px; }
.card-box {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 20px;
}
.badge-studio {
  background: #2a2a2a;
  color: #fff;
  border-radius: 999px;
  padding: .35rem .75rem;
}
.btn-red {
  background: #ff4444;
  border: none;
}
.btn-red:hover { background: #cc0000; }
.btn-ghost {
  background: #2a2a2a;
  color: #fff;
  border: none;
}
.btn-ghost:hover {
  background: #3a3a3a;
  color: #fff;
}
.section { margin-top: 20px; }
.muted{color:#bdbdbd}
    a.text-muted:hover{color:#fff}
.shots img {
  width: 300px;
  height: 300px;
  flex: 0 1 auto;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
@media (min-width:576px) {
  .shots {
    flex-wrap: nowrap !important;
    width: 100%;
    padding-right: 42px;
    padding-left: 42px;
  }
  .shots-count-3 img {
    width: calc((100% - 32px) / 3);
    min-width: 0;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .shots-count-2 img {
    width: min(300px, calc((100% - 16px) / 2));
    min-width: 0;
    height: auto;
    aspect-ratio: 1 / 1;
  }
  .shots-count-1 img {
    width: min(300px, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
@media (max-width:575.98px) {
  .shots img {
    width: 100%;
    height: 260px;
  }
}
.modal-content { background: #1a1a1a; color: #fff; }
.modal-header { border-bottom-color: #2a2a2a; }
.modal-footer { border-top-color: #2a2a2a; }
.code {
  background: #0f0f0f;
  border-radius: 8px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.captcha-wrap{
  background:#1a1a1a;
  border:1px solid #2a2a2a;
  border-radius:10px;
  padding:12px;
  display:inline-block;   
}

.smart-captcha{
  width:300px;           
  max-width:100%;         
}
.smart-captcha iframe{
  width:300px !important; 
  max-width:100% !important;
}
.navbar {
  background: #1e1e1e;
  min-height: 70px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.navbar-brand {
  color: #ff4444 !important;
  font-weight: bold;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 520px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-title {
  font-size: 1.4rem;
  line-height: 1;
}

.brand-subtitle {
  font-size: .72rem;
  color: #bdbdbd;
  margin-top: 3px;
  white-space: normal;
}

.brand-mission {
  font-size: .68rem;
  color: #8f8f8f;
  margin-top: 2px;
  white-space: normal;
}

.nav-link {
  color: #fff !important;
}

.nav-link:hover {
  color: #ff4444 !important;
}

.game-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 14px;
    background: #111;
}

.game-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 45%;
    background: linear-gradient(to top, rgba(0,0,0,.88), rgba(0,0,0,.45), transparent);
    z-index: 1;
    pointer-events: none;
}

.game-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 14px 12px 12px;
    background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.35), transparent);
}

.game-info h5 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 1px 3px rgba(0,0,0,.9);
}

.game-info p {
    margin: 3px 0 0;
    color: rgba(255,255,255,.78);
    font-size: .82rem;
    line-height: 1.15;
    text-shadow: 0 1px 3px rgba(0,0,0,.9);
}

.game-popularity {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.game-popularity span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 7px;
    border-radius: 999px;
    background: rgba(0,0,0,.62);
    backdrop-filter: blur(4px);
    color: rgba(255,255,255,.9);
    font-size: .72rem;
    line-height: 1;
    border: 1px solid rgba(255,255,255,.12);
}

.game-view-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.9);
    font-size: .9rem;
    line-height: 1;
}

.game-view-badge .today {
    color: #ff6b6b;
    font-size: .82rem;
}

.catalog-top {
    width: 100%;
}

.sort-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.sort-btn,
.period-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 15px;
    border-radius: 12px;
    background: #181818;
    border: 1px solid #333;
    color: #ccc;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
}

.sort-btn:hover,
.period-btn:hover {
    color: #fff;
    border-color: #ff4444;
    background: #221111;
}

.sort-btn.active,
.period-btn.active {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.sort-period {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .catalog-top {
        align-items: flex-start !important;
    }

    .sort-panel {
        width: 100%;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .sort-panel::-webkit-scrollbar {
        display: none;
    }

    .sort-btn,
    .period-btn {
        display: inline-flex;
        width: auto;
        min-height: 36px;
        padding: 8px 13px;
        margin-right: 6px;
        border-radius: 999px;
        font-size: .82rem;
    }

    .sort-period {
        display: inline-flex;
        width: auto;
        margin-left: 4px;
        gap: 0;
        vertical-align: top;
    }
}
