/* ==========================================================================

   THEME TOKENS

   ========================================================================== */

:root {
  /* surfaces */

  --bg-dim: rgba(10, 12, 20, 0.55);

  --card: rgba(36, 32, 56, 0.62);

  --card-2: rgba(46, 40, 70, 0.62);

  --stroke: rgba(255, 255, 255, 0.08);

  /* text & accents */

  --text: #e8e6f2;

  --muted: #b8b3cf;

  --accent: #ff8c00;

  --success: #00cd24;

  /* layout */

  --gap: 16px;

  --radius: 14px;

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

a {
  text-decoration: none;
}

/* ==========================================================================

   BASE

   ========================================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html,
body {
  margin: 0;
  padding: 0;

   /* desktop: no page scroll */

  color: var(--text);

  font: 14px/1.45 Inter, system-ui, Segoe UI, Roboto, Arial, sans-serif;
  
  /* Custom cursor */
  cursor: url('normal cursor.cur'), auto;
}

/* Custom cursor for all interactive elements */
a, button, input[type="submit"], input[type="button"], 
select, [role="button"], .clickable,
.ad, .avatar, .login-btn, .brand,
.ads-btn, .card, .server-card,
[onclick], [data-clickable] {
  cursor: url('link select.cur'), pointer !important;
}

/* background */

body {
  background: linear-gradient(0deg, var(--bg-dim), var(--bg-dim)),
    url("images/background.jpg") center center / cover no-repeat fixed;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;

  background: radial-gradient(
      1200px 600px at 80% -10%,
      rgba(255, 140, 0, 0.08),
      transparent 70%
    ),
    radial-gradient(
      900px 400px at 10% 110%,
      rgba(51, 209, 160, 0.08),
      transparent 70%
    );
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.page-header,
.top-ads,
.grid,
.footer {
  position: relative;
  z-index: 2;
}

.muted {
  color: var(--muted);
}

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));

  border: 1px solid var(--stroke);

  border-radius: var(--radius);

  box-shadow: var(--shadow);

  backdrop-filter: saturate(120%) blur(8px);

  -webkit-backdrop-filter: saturate(120%) blur(8px);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 4px 8px;
  border-radius: 999px;

  font-size: 12px;
  color: #ffd9b2;
  background: rgba(255, 255, 255, 0.08);

  border: 1px solid var(--stroke);
}

/* generic buttons */

.btn-primary {
  background: var(--accent);
  color: #111;
  border: 1px solid var(--accent);

  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  font-weight: 700;
}

.name-link {
  color: inherit;
  text-decoration: none;
}

.name-link:hover {
  text-decoration: underline;
}

.brand {
  display: flex;

  align-items: center;

  gap: 6px;

  text-decoration: none; /* убрать подчёркивание */

  color: inherit; /* оставить тот же цвет текста */
}

.brand img {
  display: block;
}

.btn-secondary {
  background: var(--accent);
  color: #111;
  border: 1px solid var(--accent);

  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
  font-weight: 700;
}

.btn-primary:hover {
  filter: brightness(0.98);
}

.btn-primary.small {
  padding: 0px 6px;
  border-radius: 20px;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);

  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}

/* inputs */

input,
textarea,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;

  border: 1px solid rgba(255, 255, 255, 0.15);

  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 14px;

  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);

  background: rgb(22 20 33);

  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.18);
}

.input-error {
  border-color: #ff3b3b !important;

  box-shadow: 0 0 0 3px rgba(255, 59, 59, 0.25) !important;
}

.small-hint {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 4px;
  font-style: italic;
  margin-left: 5px;
}

/* ==========================================================================

   HEADER & NAV

   ========================================================================== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  max-width: 1280px;
  margin: 20px auto 8px;
  padding: 10px 20px;

  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand img {
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.brand:hover img {
  transform: rotate(360deg);
}

/* Spin back animation when unhover */
@keyframes brandSpinBack {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

.brand:not(:hover) img {
  animation: brandSpinBack 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.brand span {
  font-size: 18px;
}

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 18px;
  padding: 8px 10px;
  border-radius: 8px;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.login-btn {
  margin-left: 18px;
  padding: 8px 12px;
  border-radius: 8px;

  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;

  border: 1px solid var(--stroke);
  
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.login-btn svg {
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.login-btn:hover {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

.userbox {
  position: relative;
  margin-left: 12px;
  display: inline-flex;
  align-items: center;
}

.userbox .avatar,
#avatarBtn {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid #444;
  cursor: pointer;
  vertical-align: middle;
  margin-left: 12px;
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55), 
              border-color 0.3s ease,
              box-shadow 0.3s ease;
}

.userbox .avatar:hover,
#avatarBtn:hover {
  transform: rotate(360deg);
  border-color: rgba(255, 140, 0, 0.8);
  box-shadow: 0 0 20px rgba(255, 140, 0, 0.4);
}

/* Spin back animation when unhover */
@keyframes avatarSpinBack {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(-360deg);
  }
}

.userbox .avatar:not(:hover),
#avatarBtn:not(:hover) {
  animation: avatarSpinBack 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.main-nav .userbox {
  margin-left: auto;
} /* аватар уводим вправо */

/* ==========================================================================

   TOP ADS

   ========================================================================== */

.top-ads {
  max-width: 1280px;
  margin: 30px auto 40px;
  position: relative;
  overflow: visible;
  perspective: 1500px;
  padding: 20px 0;
}

.ads-track {
  display: flex;
  gap: 30px;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: transform;
  padding: 10px;
}

.ad {
  display: block;
  width: 270px;
  height: 100px;
  flex: 0 0 auto;
  position: relative;
  
  border-radius: 16px;
  overflow: hidden;
  
  background: linear-gradient(135deg, rgba(20,20,30,0.9), rgba(10,10,20,0.95));
  
  /* 3D Transform */
  transform: translateZ(0) rotateY(0deg);
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  
  /* Glow effect */
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  /* Animation */
  animation: float 6s ease-in-out infinite;
}

.ad::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, 
    rgba(255, 140, 0, 0.4),
    rgba(255, 60, 120, 0.4),
    rgba(120, 80, 255, 0.4),
    rgba(0, 200, 255, 0.4)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.ad:hover {
  transform: translateZ(30px) rotateY(5deg) scale(1.05);
  box-shadow: 
    0 20px 60px rgba(255, 140, 0, 0.3),
    0 0 80px rgba(255, 100, 150, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation-play-state: paused;
}

.ad:hover::before {
  opacity: 1;
}

.ad:nth-child(2n):hover {
  transform: translateZ(30px) rotateY(-5deg) scale(1.05);
}

.ad img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: brightness(0.9) contrast(1.1);
}

.ad:hover img {
  transform: scale(1.1);
  filter: brightness(1.1) contrast(1.2) saturate(1.2);
}

/* Floating animation */
@keyframes float {
  0%, 100% {
    transform: translateZ(0) translateY(0px) rotateY(0deg);
  }
  50% {
    transform: translateZ(10px) translateY(-8px) rotateY(2deg);
  }
}

/* Stagger animation delay */
.ad:nth-child(1) { animation-delay: 0s; }
.ad:nth-child(2) { animation-delay: 0.2s; }
.ad:nth-child(3) { animation-delay: 0.4s; }
.ad:nth-child(4) { animation-delay: 0.6s; }

.ads-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;

  width: 48px;
  height: 48px;
  border-radius: 50%;

  border: 2px solid rgba(255, 140, 0, 0.3);
  background: linear-gradient(135deg, 
    rgba(20, 20, 30, 0.95),
    rgba(30, 25, 40, 0.95)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  
  color: #ff8c00;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 140, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ads-btn:hover {
  background: linear-gradient(135deg, 
    rgba(255, 140, 0, 0.2),
    rgba(255, 100, 50, 0.2)
  );
  border-color: rgba(255, 140, 0, 0.6);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 
    0 8px 30px rgba(255, 140, 0, 0.4),
    0 0 40px rgba(255, 140, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.ads-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.ads-btn.prev {
  left: -20px;
}
.ads-btn.next {
  right: -20px;
}

/* ==========================================================================

   GRID (index.php)

   ========================================================================== */

.grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;

  height: 60vh; /* only 60% of viewport height */

  display: grid;
  grid-template-columns: 1fr 1fr 360px;
  gap: var(--gap);

  align-content: start;
}

/* columns with inner scroll */

.col {
  background: linear-gradient(180deg, var(--card), var(--card-2));

  border: 1px solid var(--stroke);

  border-radius: var(--radius);

  padding: 0;

  box-shadow: var(--shadow);

  backdrop-filter: saturate(120%) blur(8px);

  -webkit-backdrop-filter: saturate(120%) blur(8px);

  max-height: 100%;

  overflow: hidden;

  position: relative;
}

.col-content {
  padding: 14px;
  max-height: 100%;
  overflow: auto;
  scrollbar-width: none;
}

.col-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* Fade effect at bottom of columns */
.col-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent 0%, rgba(36, 32, 56, 0.85) 40%, rgba(36, 32, 56, 0.98) 100%);
  pointer-events: none;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 10;
}

.col h3 {
  margin: 4px 4px 10px;
  font-size: 16px;
  letter-spacing: 0.3px;
}

.col h4 {
  margin: 16px 4px 8px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* lists (index.php) */

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list.small li {
  padding: 8px 10px;
}

.list li {
  position: relative;

  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;

  padding: 8px 10px;
  border-radius: 12px;

  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 8px;

  border: 1px solid rgba(255, 255, 255, 0.04);

  overflow: hidden; /* для фонового псевдоэлемента */
}

.list li:hover {
  background: rgba(255, 255, 255, 0.08);
}

.name {
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.date {
  background: rgba(255, 140, 0, 0.18);
  color: #ffd9b2;

  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 6px;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
  vertical-align: middle;
}

/* header row inside card */

.server-card .header {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
}

.server-card .header .name {
  flex: 1;
  margin-left: 5px;
}

/* ==========================================================================

   SERVER CARD: SHARED + TOP-PAGE SPECIFICS

   ========================================================================== */

.server-card {
  position: relative;
}

.server-card.has-bg {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.1);
}

.server-card.has-bg::before {
  content: "";

  position: absolute;
  inset: 0;

  background: linear-gradient(
      180deg,
      rgba(20, 18, 30, 0.72),
      rgba(20, 18, 30, 0.68)
    ),
    var(--server-bg, none);

  background-size: cover;

  background-position: center;

  filter: saturate(1.05);

  border-radius: 12px;

  z-index: 0;
}

.server-card.has-bg > * {
  position: relative;
  z-index: 1;
}

.server-card.has-bg:hover::before {
  filter: saturate(1.12) brightness(1.02);
}

/* Generic icon buttons */

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.icon-btn:hover {
  background: #333;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
  fill: #ffcc8a;
}

/* Like buttons (generic) */

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 4px 8px;
  border-radius: 8px;

  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #ffcc8a;
  cursor: pointer;
  user-select: none;
}

.like-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================

   RIGHT COLUMN (index.php): Top-10

   ========================================================================== */

.col.right .likes {
  list-style: none;
  margin: 0;
  padding: 0;
}

.col.right .likes li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;

  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  margin-bottom: 8px;

  border: 1px solid rgba(255, 255, 255, 0.04);
}

.rank {
  font-weight: 700;
  color: #ffc48f;
}

/* ==========================================================================

   PREMIUM TAGS / VISUALS

   ========================================================================== */

.tag {
  padding: 2px 6px;
  border-radius: 6px;

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;

  border: 1px solid transparent;
  vertical-align: middle;
}

.tag.hot {
  color: #ffb14a;
  background: rgba(255, 140, 0, 0.12);
  border-color: rgba(255, 140, 0, 0.35);
}

.tag.super {
  color: #ffe28a;
  background: rgba(255, 215, 64, 0.14);
  border-color: rgba(255, 215, 64, 0.45);
}

.server-card.premium-1 {
  box-shadow: 0 0 0 1px rgba(255, 140, 0, 0.25),
    0 0 10px rgba(255, 140, 0, 0.12);
}

.server-card.premium-1 .name {
  color: #ffcc8a;
}

.server-card.premium-1 .date {
  border-color: rgba(255, 140, 0, 0.35) !important;

  background: rgba(255, 140, 0, 0.14) !important;

  color: #ffb14a !important;
}

.server-card.premium-2 {
  background-image: linear-gradient(
    180deg,
    rgba(255, 215, 64, 0.08),
    rgba(0, 0, 0, 0) 60%
  );

  box-shadow: 0 0 0 1px rgba(255, 215, 64, 0.35),
    0 0 10px rgba(255, 215, 64, 0.15);

  position: relative;
}

.server-card.premium-2 .name {
  color: #ffe28a;
}

.server-card.premium-2 .date {
  border-color: rgba(255, 215, 64, 0.45) !important;

  background: rgba(255, 215, 64, 0.16) !important;

  color: #ffe28a !important;
}

/* “Open” badge */

.badge-open {
  background: rgb(0 255 45 / 18%);

  color: var(--success);

  border: 1px solid rgb(0 137 47 / 28%);
}

/* ========================================================================== */

/* TOOLTIP (shared)                                                           */

/* ========================================================================== */

.card-tip {
  position: fixed;
  z-index: 998;
  pointer-events: none;
  max-width: 340px;

  background: rgba(30, 30, 30, 0.9);
  color: #fff;
  border-radius: 10px;

  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.3;
  display: none;

  border: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.card-tip h5 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #ffcc8a;
}

.card-tip .pair {
  display: flex;
  gap: 6px;
  align-items: center;
}

.card-tip .k {
  opacity: 0.75;
  min-width: 88px;
}

.card-tip .v {
  flex: 1;
  word-break: break-word;
}

/* Только для “Recent likes”: ник + дата вправо */

.card-tip .like-line {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.card-tip .like-nick {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-tip .like-date {
  margin-left: auto;
  white-space: nowrap;
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================

   FOOTER - MODERN DESIGN WITH EFFECTS

   ========================================================================== */

.footer {
  position: relative;
  width: 100%;
  margin-top: 80px;
  padding: 0;
  z-index: 3;
  overflow: hidden;
}

.footer-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    rgba(17, 14, 26, 0.85) 0%, 
    rgba(25, 20, 40, 0.95) 50%,
    rgba(15, 10, 30, 1) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 0;
}

.footer-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 160, 40, 0.5) 20%, 
    rgba(255, 140, 0, 0.8) 50%, 
    rgba(255, 160, 40, 0.5) 80%, 
    transparent 100%);
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.footer-content {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px 20px;
  z-index: 1;
}

.f-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col {
  position: relative;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.footer-col:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 160, 40, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(255, 140, 0, 0.15);
}

.footer-icon {
  font-size: 32px;
  margin-bottom: 12px;
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.footer-col:nth-child(1) .footer-icon { animation-delay: 0s; }
.footer-col:nth-child(2) .footer-icon { animation-delay: 0.2s; }
.footer-col:nth-child(3) .footer-icon { animation-delay: 0.4s; }
.footer-col:nth-child(4) .footer-icon { animation-delay: 0.6s; }

.footer-col h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffd9b2;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col p {
  margin: 0 0 8px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: linear-gradient(135deg, rgba(255, 160, 40, 0.2), rgba(255, 140, 0, 0.3));
  border-color: rgba(255, 160, 40, 0.5);
  transform: translateY(-3px) rotate(5deg);
  box-shadow: 0 5px 15px rgba(255, 140, 0, 0.3);
}

.time-display {
  margin-top: 10px;
  padding: 12px;
  background: rgba(255, 160, 40, 0.1);
  border: 1px solid rgba(255, 160, 40, 0.2);
  border-radius: 8px;
  text-align: center;
}

.time-display strong {
  font-size: 24px;
  font-weight: 800;
  color: #ffa028;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(255, 160, 40, 0.5);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.stat-item {
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-item:hover {
  background: rgba(255, 160, 40, 0.1);
  border-color: rgba(255, 160, 40, 0.3);
  transform: scale(1.05);
}

.stat-value {
  font-size: 20px;
  font-weight: 800;
  color: #ffa028;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-timer {
  margin-top: 10px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 160, 40, 0.1));
  border: 1px solid rgba(255, 160, 40, 0.2);
  border-radius: 8px;
  text-align: center;
}

.reset-timer strong {
  font-size: 28px;
  font-weight: 900;
  color: #ff6b6b;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  text-shadow: 0 0 15px rgba(255, 107, 107, 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

.reset-info {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.footer-bottom {
  position: relative;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-wave {
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 160, 40, 0.3) 25%, 
    rgba(255, 140, 0, 0.6) 50%, 
    rgba(255, 160, 40, 0.3) 75%, 
    transparent 100%);
  animation: wave 4s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.copy {
  margin: 0;
  padding: 15px 0;
  color: #9b95b8;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* ==========================================================================

   RESPONSIVE (index + shared)

   ========================================================================== */

@media (max-width: 1200px) {
  .grid {
    grid-template-columns: 1fr 1fr;
    height: 60vh;
  }

  .col.right {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1024px) {
  .f-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer {
    position: relative;
    min-height: 500px;
  }
  
  .footer-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow: visible;
  }

  .top-ads {
    padding: 0 40px;
    height: 110px;
  }

  .grid {
    grid-template-columns: 1fr;
    height: auto;
    padding-bottom: 12px;
  }

  .f-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .footer {
    position: relative;
    transform: none;
    margin-top: 40px;
    min-height: 400px;
  }
  
  .footer-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  
  .footer-content {
    padding: 30px 15px 15px;
    position: relative;
    z-index: 1;
  }
  
  .footer-col {
    padding: 15px;
    text-align: center;
  }
  
  .footer-icon {
    font-size: 28px;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .time-display strong {
    font-size: 20px;
  }
  
  .reset-timer strong {
    font-size: 24px;
  }
}

/* ==========================================================================

   SMALL MODAL (generic) — for small popups like top-up

   ========================================================================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-body {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 22px;
  width: min(520px, 88vw);
  max-height: 70vh;
  overflow: auto;
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  animation: modalIn 0.2s ease;
}

.modal h3 {
  margin: 0 0 12px;
  font-size: 18px;
  text-align: center;
}

.modal button {
  margin-top: 10px;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.modal button[type="submit"] {
  background: var(--accent);
  color: #111;
  font-weight: 700;
  margin-right: 6px;
}

.modal button[type="button"] {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text);
}

.modal button:hover {
  opacity: 0.95;
}

@keyframes modalIn {
  from {
    transform: scale(0.98);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ==========================================================================

   BIG USERCP MODAL (#usercp)

   ========================================================================== */

#usercp {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.usercp-card {
  width: min(1200px, 70vw);
  height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* фикс шапки */
  color: var(--text);
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: saturate(120%) blur(8px);
  -webkit-backdrop-filter: saturate(120%) blur(8px);
  animation: modalIn 0.22s ease;
}

/* header */

.usercp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #2c2c2c;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
  position: relative;
}

.usercp-head img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #444;
}

/* title block */

.usercp-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.usercp-title .subtitle {
  opacity: 0.7;
  font-size: 12px;
}

/* balance pill (in title area) */

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.usercp-tabs {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.usercp-tabs .tab-btn {
  background: #2a2a2aa3;
  border: 1px solid #3a3a3a;
  color: #fff;

  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.usercp-tabs .tab-btn.active {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

.usercp-head .close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.usercp-head .close:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* body */

.usercp-body {
  padding: 16px;
  overflow: auto;
  flex: 1;
  scrollbar-width: none;
}

.usercp-body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.usercp-section .row {
  margin: 8px 0;
}

.usercp-section .row.inline {
  display: flex;
  gap: 8px;
}

.usercp-section .row.inline > div {
  flex: 1;
}

.usercp-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* embedded Add form */

#addServer {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border: 0;
}

#addServer label {
  display: block;
  font-size: 12px;
  opacity: 0.9;
  margin-bottom: 4px;
  margin-left: 5px;
}

/* compact form (shared) */

.form-compact .row {
  margin: 6px 0;
}

.form-compact input,
.form-compact select,
.form-compact textarea {
  padding: 8px 10px;
  font-size: 13px;
}

.usercp-section .row.inline.two-1 > div:first-child {
  flex: 2;
} /* name */

.usercp-section .row.inline.two-1 > div:last-child {
  flex: 1;
} /* style */

/* inline editor (My servers) */

.editForm label {
  display: block;
  font-size: 12px;
  opacity: 0.9;
  margin: 0 0 4px 5px;
}

.editForm textarea {
  resize: vertical;
  min-height: 70px;
}

.editForm .usercp-actions {
  margin-top: 10px;
  gap: 8px;
}

/* My servers list */

.servers-list {
  display: grid;
  gap: 10px;
}

.servers-list .my-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "card actions"
    "editor editor";
  gap: 0px 8px;
  align-items: center;
}

.servers-list .my-item .card {
  grid-area: card;
  padding: 8px;
  border: 1px solid var(--stroke);

  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.servers-list .my-item .actions {
  grid-area: actions;
  display: flex;
  gap: 6px;
}

.servers-list .my-item .actions button,
.servers-list .my-item .actions a {
  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  color: #fff;
  padding: 9px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}

.servers-list .my-item .actions .primary {
  background: var(--accent);
  color: #111;
  border-color: var(--accent);
}

.servers-list .my-item .editor {
  grid-area: editor;
  display: none;
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.servers-list .my-item .editor.open {
  display: block;
  animation: editorIn 0.18s ease;
}

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

@media (max-width: 760px) {
  .servers-list .my-item {
    grid-template-columns: 1fr;
    grid-template-areas:
      "card"
      "actions"
      "editor";
  }

  .servers-list .my-item .actions {
    justify-content: flex-start;
  }
}

/* hide legacy small add-server modal trigger binding */

.open-add-server,
.open-add-banner {
  display: none !important;
}

/* ==========================================================================

   TOP PAGE (top.php)

   ========================================================================== */

/* Frame + toolbar */

.page-frame {
  max-width: 1280px;
  margin: 20px auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* Селект в тёмном стиле */

.top-toolbar select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: rgba(
    255,
    255,
    255,
    0.06
  ) !important; /* фон «как у инпутов» */
  color: var(--text) !important;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 10px 36px 10px 12px; /* место под стрелку справа */
  line-height: 1.2;
}

/* Стрелка (svg) поверх фона */

.top-toolbar select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* Цвета при фокусе */

.top-toolbar select:focus {
  outline: none;
  border-color: rgba(255, 153, 0, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.12);
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: var(--text) !important;
}

/* Сами пункты выпадающего списка (когда раскрыт) */

.top-toolbar select option {
  background: #121212;
  color: #fff;
}

/* На некоторых Edge/Chromium белеет при disabled – фикс */

.top-toolbar select:disabled {
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .top-toolbar {
    grid-template-columns: 1fr;
  }
}

/* List area */

.list-wrap {
  height: 60vh;
  padding: 5px;
  overflow: auto;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.list-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#topList {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

/* Card layout on TOP page (each LI has class .server-card) */

#topList .server-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid rgba(255, 255, 255, 0.04);
}

#topList .server-card .rank {
  font-weight: 800;
  color: #ffc48f;
  font-size: 24px;

  width: 42px;
  text-align: center;
}

#topList .server-card .name-wrap .name {
  font-weight: 700;
}

#topList .server-card .name-wrap .meta {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

#topList .server-card .cell.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Load more */

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0 4px;
}

.load-more {
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #111;

  border: 1px solid var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.load-more[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Tooltip (recent likes) on TOP page — reuse shared but slightly wider */

.card-tip {
  max-width: 360px;
}

/* TOP page modal (server details + reviews) */

.modal-card {
  width: min(1200px, 70vw);

  height: 70vh;

  display: flex;
  flex-direction: column;

  color: var(--text);

  background: linear-gradient(180deg, var(--card), var(--card-2));

  border: 1px solid var(--stroke);

  border-radius: var(--radius);

  -webkit-backdrop-filter: saturate(120%) blur(8px);

  animation: modalIn 0.2s ease;

  overflow: hidden;
}

.m-head {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 14px;
  border-bottom: 1px solid var(--stroke);

  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}

.m-ava {
  width: 36px;
  height: 36px;
  border-radius: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #2a2a2a;
  border: 1px solid #3a3a3a;
  font-weight: 800;
}

.m-title {
  font-weight: 800;
  letter-spacing: 0.2px;
}

.m-close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--stroke);

  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.m-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.m-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 12px;

  padding: 12px;
  overflow: auto;
  max-height: calc(80vh - 58px);
}

@media (max-width: 900px) {
  .m-grid {
    grid-template-columns: 1fr;
  }
}

/* Simple boxed sections inside modal */

.box {
  border: 1px solid rgba(255, 255, 255, 0.08);

  background: rgba(255, 255, 255, 0.04);

  border-radius: 10px;

  padding: 10px;
}

/* Reviews block */

.rev-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 6px;
}

.rev-head .avg {
  font-weight: 800;
}

.rev-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.rev-form .stars {
  display: flex;
  gap: 6px;
}

.rev-form .stars button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.rev-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;
}

.rev-item .meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

/* — Ставим уведомление выше любого модала/оверлея — */

:root {
  --z-usercp: 9000; /* если используешь для usercp */

  --z-notify: 100000; /* нотификация всегда выше */
}

#notifyModal {
  position: fixed !important;

  inset: 0 !important; /* top/right/bottom/left = 0 */

  display: none; /* показываем из JS */

  align-items: center;

  justify-content: center;

  z-index: var(--z-notify) !important;

  /* фон + блюр */

  background: rgba(10, 8, 20, 0.45);

  backdrop-filter: blur(6px);

  -webkit-backdrop-filter: blur(6px);
}

#notifyModal .modal-body {
  position: relative;

  z-index: 1; /* на всякий случай поверх бэкдропа */
}

/* если у usercp нет z-index — можно задать ниже, чем у notify */

#usercp {
  z-index: var(--z-usercp);
}

/* Center notification tweaks */

.notify-body {
  text-align: center;
}

.notify-title {
  margin: 0 0 8px;
  font-size: 18px;
  color: #ffd9b2;
}

.notify-msg {
  margin: 0 0 12px;
  color: var(--text);
  opacity: 0.95;
}

.notify-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
}

.notify-actions .btn-primary {
  min-width: 120px;
}

.notify-actions .btn-ghost {
  min-width: 120px;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10002;
  position: relative;
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: var(--text);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Responsive navigation */
@media (max-width: 900px) {
  .page-header {
    z-index: 10001;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .main-nav {
    display: flex;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(36, 32, 56, 0.18), rgba(46, 40, 70, 0.98));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 20px 20px;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.5);
    z-index: 10000;
    overflow-y: auto;
  }
  
  .main-nav.active {
    right: 0;
  }
  
  .main-nav a {
    margin: 0 0 10px 0 !important;
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    display: block;
    color: var(--text);
    opacity: 1;
    visibility: visible;
  }
  
  .main-nav a:hover {
    background: rgba(255,255,255,0.1);
  }
  
  .main-nav .login-btn {
    margin: 10px 0 !important;
    width: 100%;
    text-align: center;
    display: block;
    opacity: 1;
    visibility: visible;
  }
  
  .main-nav .userbox {
    margin: 10px 0 !important;
    width: 100%;
    display: block;
    opacity: 1;
    visibility: visible;
  }
}

/* Responsive brutal ads */
@media (max-width: 768px) {
  .top-ads {
    margin: 20px auto 30px;
    padding: 15px 10px;
    overflow: hidden;
  }
  
  .ads-track {
    gap: 20px;
    padding: 5px;
  }
  
  .ad {
    width: 240px;
    height: 90px;
    animation: float 8s ease-in-out infinite;
  }
  
  .ad:hover {
    transform: translateZ(20px) scale(1.03);
  }
  
  .ads-btn {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .ads-btn.prev {
    left: 5px;
  }
  .ads-btn.next {
    right: 5px;
  }
}

@media (max-width: 480px) {
  .top-ads {
    margin: 15px auto 25px;
  }
  
  .ads-track {
    gap: 15px;
  }
  
  .ad {
    width: 200px;
    height: 75px;
  }
  
  .ads-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}
