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

html, body {
  min-height: 100vh;
  width: 100%;
  background-color: #520006;
  color: #ffffff;
  font-family: Arial, Helvetica, Tahoma, sans-serif;
  font-size: 12px;
  line-height: 1.25;
  overflow-x: hidden;
}

.top-header {
  background: linear-gradient(180deg, #290003 0%, #450005 100%);
  padding: 6px 12px 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.logo-link {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  line-height: 0;
}

.logo-svg {
  height: 58px;
  width: auto;
  display: block;
}

.search-form { display: flex; align-items: center; gap: 4px; }

.search-input {
  width: 225px;
  height: 24px;
  background: #ffffff;
  border: 1px solid #b83b44;
  padding: 0 6px;
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: #000000;
}

.search-btn {
  height: 24px;
  padding: 0 11px;
  background: linear-gradient(180deg, #ff4747 0%, #b8111b 50%, #80060d 100%);
  border: 1px solid #ff8a8a;
  border-radius: 3px;
  color: #ffffff;
  font-family: Arial, sans-serif;
  font-size: 11.5px;
  font-weight: bold;
  cursor: pointer;
}

.nav-row-1 {
  background: linear-gradient(180deg, #e02834 0%, #b3121d 48%, #8f0a13 52%, #b8141f 100%);
  border-top: 1px solid #ff7a82;
  border-bottom: 1px solid #300003;
  padding: 5px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-links { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(40, 0, 0, 0.8);
}

.nav-links a:hover, .nav-links a.active { text-decoration: underline; color: #ffff88; }

.flag-ico {
  display: inline-block;
  width: 20px;
  height: 13px;
  border: 1px solid #ffffff;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 186px;
  min-height: calc(100vh - 96px);
  background-color: #520006;
}

.left-col { display: flex; flex-direction: column; min-width: 0; }

.sub-nav {
  background: linear-gradient(180deg, #9c0f19 0%, #6e060d 100%);
  border-bottom: 1px solid #c4232e;
  padding: 5px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11.5px;
}

.sub-nav a { color: #ffd4d8; text-decoration: none; cursor: pointer; }
.sub-nav a.active-sub, .sub-nav a:hover { color: #ffffff; font-weight: bold; text-decoration: underline; }

.content-pad { padding: 10px 16px 28px; }

.pagination {
  text-align: center;
  padding: 4px 0 12px;
  font-size: 12.5px;
  user-select: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
}

.pg {
  display: inline-block;
  padding: 2px 6px;
  color: #ffffff;
  text-decoration: none;
  cursor: pointer;
}

.pg:hover { text-decoration: underline; color: #ffff88; }

.pg.current {
  border: 1px solid #ff99a0;
  background: #8f0b14;
  font-weight: bold;
}

.pg.next-btn {
  border: 1px solid #ff99a0;
  padding: 2px 8px;
  margin-left: 4px;
  font-weight: bold;
}

.grid-3x2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 12px;
  margin-bottom: 18px;
}

.thumb-item { text-align: center; }

.thumb-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  margin-bottom: 4px;
  cursor: pointer;
}

.thumb-item a {
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  text-decoration: underline;
  display: block;
  cursor: pointer;
}

.thumb-item a:hover { color: #ffff77; }
.thumb-meta { font-size: 10.5px; color: #ffb3b8; margin-top: 2px; }

.info-panel {
  background: #380004;
  border: 1px solid #9e1c25;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.info-panel h3 {
  font-size: 13px;
  color: #ffff88;
  border-bottom: 1px solid #8a151d;
  padding-bottom: 4px;
  margin-bottom: 8px;
}

.raw-table { width: 100%; border-collapse: collapse; }
.raw-table td { padding: 5px 6px; border-bottom: 1px dotted #8a1c24; }
.raw-table a { color: #ff9ea5; text-decoration: underline; }

.right-col {
  background-color: #3b0004;
  border-left: 1px solid #8a151d;
  display: flex;
  flex-direction: column;
}

.ads-top-label {
  background: #2b0003;
  text-align: center;
  padding: 5px 4px;
  font-size: 10.5px;
  color: #ffc7cc;
  border-bottom: 1px solid #8a151d;
}

.ads-body { padding: 6px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

.settings-btn {
  background: #000000;
  color: #ffffff;
  border: 1px solid #666666;
  padding: 2px 6px;
  font-size: 10.5px;
  display: inline-block;
}

.ad-box { border: 1px solid #d4a5a8; background: #000000; width: 100%; }
.ad-box img { width: 100%; display: block; }

@media (max-width: 760px) {
  .top-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
  }
  .logo-svg { height: 44px; }
  .header-search { width: 100%; }
  .search-form { width: 100%; }
  .search-input { flex: 1; width: 100%; height: 28px; }
  .search-btn { height: 28px; padding: 0 14px; }

  .nav-row-1 { padding: 6px 10px; }
  .nav-links { gap: 10px 12px; }
  .nav-links a { font-size: 13px; }

  .sub-nav { padding: 6px 10px; gap: 10px; }

  .main-layout { grid-template-columns: 1fr; }
  .content-pad { padding: 8px 10px 20px; }
  .grid-3x2 { grid-template-columns: repeat(2, 1fr); gap: 12px 8px; }

  .right-col {
    border-left: none;
    border-top: 1px solid #8a151d;
  }
  .ads-body {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 8px 10px;
  }
  .settings-btn { width: auto; }
  .ad-box { width: 48.5%; }
}

.site-footer {
  background: linear-gradient(180deg, #2b0003 0%, #170001 100%);
  border-top: 2px solid #9e1c25;
  padding: 14px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-logo-svg {
  height: 36px;
  width: auto;
  display: block;
}

.retro-banners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.portal-banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 176px;
  height: 38px;
  padding: 0 10px;
  text-decoration: none;
  background: linear-gradient(180deg, #d9232f 0%, #990c15 49%, #73050c 51%, #a3101a 100%);
  border: 1px solid #ff7a82;
  box-shadow: 0 0 0 1px #1f0002, inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 5px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  transition: filter 0.12s ease, transform 0.1s ease;
}

.portal-banner:hover {
  border-color: #ffff88;
  filter: brightness(1.12);
}

.portal-banner:active {
  transform: translateY(1px);
}

.portal-banner.alt {
  background: linear-gradient(180deg, #6e080f 0%, #420206 49%, #2b0003 51%, #520409 100%);
  border-color: #c4232e;
}

.portal-banner.alt:hover {
  border-color: #ffff88;
}

.pb-text {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.05;
}

.pb-title {
  font-family: Impact, Arial Narrow, Tahoma, sans-serif;
  font-size: 16px;
  letter-spacing: 0.6px;
  color: #ffffff;
  text-shadow: 1px 1px 0 #260002;
}

.portal-banner:hover .pb-title {
  color: #ffff88;
}

.pb-sub {
  font-family: Tahoma, Arial, sans-serif;
  font-size: 9.5px;
  color: #ffc7cc;
  margin-top: 1px;
}

