:root {
  --purple: #7B2FBE;
  --purple-dark: #5a1f8f;
  --purple-light: #9d4fe0;
  --teal: #00C9B1;
  --teal-dark: #009e8c;
  --bg: #0d0d1a;
  --bg2: #13131f;
  --bg3: #1a1a2e;
  --text: #e8e8f0;
  --text-muted: #888899;
  --border: rgba(123,47,190,0.3);
  --radius: 12px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }

/* NAV */
.navbar { background: rgba(13,13,26,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 60px; position: sticky; top: 0; z-index: 100; }
.nav-logo { font-size: 1.4rem; font-weight: 800; background: linear-gradient(135deg, var(--purple-light), var(--teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 2px; }
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { color: var(--text-muted); font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a.nav-cabinet { color: var(--teal); }

/* MAIN */
main { flex: 1; }

/* FOOTER */
footer { text-align: center; padding: 2rem; color: var(--text-muted); font-size: .85rem; border-top: 1px solid var(--border); position: relative; }
.lock-btn { position: absolute; bottom: 1rem; right: 1.5rem; font-size: 1rem; opacity: 0.25; transition: opacity .3s; color: var(--text-muted); }
.lock-btn:hover { opacity: 0.7; }

/* BUTTONS */
.btn { display: inline-block; padding: .6rem 1.4rem; border-radius: 8px; font-weight: 600; font-size: .9rem; cursor: pointer; border: none; transition: all .2s; text-align: center; }
.btn-primary { background: linear-gradient(135deg, var(--purple), var(--purple-light)); color: #fff; }
.btn-primary:hover { background: linear-gradient(135deg, var(--purple-dark), var(--purple)); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 2px solid var(--teal); color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: var(--bg); }
.btn-outline-sm { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: .4rem .8rem; border-radius: 6px; font-size: .85rem; cursor: pointer; }
.btn-panel { background: linear-gradient(135deg, var(--teal-dark), var(--teal)); color: var(--bg); font-weight: 700; }
.btn-panel:hover { opacity: .9; color: var(--bg); }
.btn-sm { background: var(--bg3); border: 1px solid var(--border); color: var(--text); padding: .3rem .6rem; border-radius: 6px; cursor: pointer; font-size: .8rem; }
.btn-danger { border-color: #e05555; color: #e05555; }
.btn-danger:hover { background: #e05555; color: #fff; }
.full-width { width: 100%; }

/* HERO */
.hero { min-height: 80vh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 0%, rgba(123,47,190,0.3) 0%, transparent 70%); }
.hero-glow { position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(0,201,177,0.08) 0%, transparent 70%); top: 50%; left: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.hero-content { text-align: center; z-index: 1; padding: 2rem; }
.hero-avatar { font-size: 5rem; margin-bottom: 1rem; filter: drop-shadow(0 0 30px var(--purple)); }
.hero-content h1 { font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 900; background: linear-gradient(135deg, var(--purple-light) 30%, var(--teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: 4px; margin-bottom: .5rem; }
.hero-sub { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2rem; letter-spacing: 2px; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* SECTIONS */
.section { max-width: 1100px; margin: 0 auto; padding: 4rem 2rem; }
.section-title { font-size: 1.8rem; font-weight: 800; margin-bottom: 2rem; background: linear-gradient(135deg, var(--purple-light), var(--teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sub-title { font-size: 1.2rem; font-weight: 700; color: var(--text-muted); margin: 2rem 0 1rem; }
.center { text-align: center; margin-top: 2rem; }

/* CARDS */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; transition: border-color .2s, transform .2s; }
.card:hover { border-color: var(--purple-light); transform: translateY(-2px); }
.card h3 { color: var(--purple-light); margin-bottom: .5rem; }
.card-date { font-size: .8rem; color: var(--text-muted); margin-top: .5rem; display: block; }

/* GAMES */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; }
.game-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color .2s, transform .2s; }
.game-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.game-cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; object-position: center; }
.game-info { padding: 1rem; }
.game-info h3 { margin-bottom: .5rem; font-size: 1rem; }
.game-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; }
.progress-bar { background: var(--bg3); border-radius: 4px; height: 6px; margin: .5rem 0 .25rem; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--teal)); border-radius: 4px; transition: width .5s; }
.progress-label { font-size: .8rem; color: var(--teal); font-weight: 600; }
.status { font-size: .8rem; font-weight: 600; display: inline-block; margin-bottom: .5rem; }
.status-playing { color: #4ade80; }
.status-completed { color: var(--teal); }
.status-paused { color: #f59e0b; }

/* ABOUT */
.about-section { border-top: 1px solid var(--border); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media(max-width:700px) { .about-grid { grid-template-columns: 1fr; } }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem; text-align: center; }
.stat-num { display: block; font-size: 1.1rem; font-weight: 800; color: var(--teal); }
.stat-label { font-size: .8rem; color: var(--text-muted); }

/* STREAMS */
.stream-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media(max-width:600px) { .stream-links { grid-template-columns: 1fr; } }
.stream-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; display: flex; gap: 1.5rem; align-items: center; transition: border-color .2s, transform .2s; }
.stream-card:hover { transform: translateY(-2px); }
.twitch-card:hover { border-color: #9146ff; }
.yt-card:hover { border-color: #ff0000; }
.stream-icon { font-size: 2.5rem; }
.stream-card h3 { margin-bottom: .25rem; }
.stream-card p { color: var(--text-muted); font-size: .9rem; margin-bottom: .75rem; }
.info-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.info-box h3 { color: var(--purple-light); margin-bottom: 1rem; }
.info-box ul { list-style: none; }
.info-box ul li { padding: .4rem 0; color: var(--text-muted); }
.info-box ul li::before { content: "→ "; color: var(--teal); }

/* CONTACTS */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }
.contact-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: flex; gap: 1rem; align-items: center; transition: border-color .2s, transform .2s; }
.contact-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.contact-card span { font-size: 2rem; }
.contact-card h3 { margin-bottom: .2rem; }
.contact-card p { color: var(--text-muted); font-size: .9rem; }

/* LOGIN */
.login-section { display: flex; align-items: center; justify-content: center; min-height: 80vh; }
.login-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; width: 100%; max-width: 400px; }
.login-box h2 { text-align: center; margin-bottom: 2rem; color: var(--purple-light); }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: .4rem; color: var(--text-muted); font-size: .9rem; }
.form-group input { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: .75rem 1rem; color: var(--text); font-size: 1rem; outline: none; transition: border-color .2s; }
.form-group input:focus { border-color: var(--purple-light); }
.alert-error { background: rgba(224,85,85,0.15); border: 1px solid #e05555; border-radius: 8px; padding: .75rem 1rem; margin-bottom: 1.5rem; color: #e05555; font-size: .9rem; }

/* CABINET */
.cabinet-section { max-width: 900px; }
.cabinet-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.cabinet-header h2 { background: linear-gradient(135deg, var(--purple-light), var(--teal)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; font-size: 1.8rem; }
.cabinet-actions { display: flex; gap: .75rem; align-items: center; }
.cabinet-block { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.cabinet-block h3 { color: var(--purple-light); margin-bottom: 1rem; }
.form-inline { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-start; }
.form-inline input, .form-inline select, .form-inline textarea { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .9rem; color: var(--text); font-size: .9rem; outline: none; flex: 1; min-width: 160px; }
.form-inline textarea { min-height: 80px; resize: vertical; }
.form-inline input:focus, .form-inline select:focus, .form-inline textarea:focus { border-color: var(--purple-light); }
.cabinet-list { display: flex; flex-direction: column; gap: .75rem; }
.cabinet-item { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: .9rem 1rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ci-info { flex: 1; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.ci-actions { display: flex; gap: .5rem; }
.edit-form { width: 100%; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; padding-top: .75rem; border-top: 1px solid var(--border); }
.edit-form input, .edit-form select { background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: .5rem .75rem; color: var(--text); font-size: .85rem; flex: 1; min-width: 120px; }
.empty-msg { color: var(--text-muted); text-align: center; padding: 2rem; }

/* ── Game meta (date + rating) ───────────────────────────────────────────── */
.game-meta {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .4rem;
}
.game-date {
  font-size: .8rem;
  color: var(--teal);
  background: rgba(0,201,177,.1);
  padding: 2px 8px;
  border-radius: 12px;
}
.game-rating {
  font-size: .8rem;
  color: #ffd700;
  background: rgba(255,215,0,.1);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

/* ── Majestic RP Ad ──────────────────────────────────────────────────────── */
.majestic-ad {
  display: block;
  text-decoration: none;
  background: linear-gradient(135deg, #0d1b2a 0%, #1a1a3e 50%, #0d1b2a 100%);
  border: 1px solid var(--purple);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.majestic-ad::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(123,47,190,.08), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer { 0%{transform:translateX(-100%)} 100%{transform:translateX(100%)} }
.majestic-ad:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,201,177,.15); }
.majestic-ad-content { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.majestic-ad-left { flex: 1; }
.majestic-tag { font-size: .75rem; color: var(--teal); text-transform: uppercase; letter-spacing: 2px; }
.majestic-title { font-size: 2rem; font-weight: 800; color: #fff; margin: .3rem 0 .6rem; }
.majestic-desc { color: var(--text-dim); font-size: .95rem; max-width: 400px; }
.majestic-ad-right { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.promo-box { background: rgba(123,47,190,.2); border: 2px solid var(--purple-light); border-radius: 12px; padding: 1rem 2rem; text-align: center; }
.promo-label { display: block; font-size: .75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.promo-code { display: block; font-size: 2rem; font-weight: 900; color: #fff; letter-spacing: 4px; font-family: monospace; }
.promo-hint { display: block; font-size: .75rem; color: var(--purple-light); }
.majestic-cta { color: var(--teal); font-weight: 700; font-size: 1.1rem; }

/* ── PC Specs ────────────────────────────────────────────────────────────── */
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.pc-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: .9rem 1.2rem; display: flex; flex-direction: column; gap: .3rem; transition: border-color .2s; }
.pc-card:hover { border-color: var(--purple-light); }
.pc-component { font-size: .78rem; color: var(--teal); text-transform: uppercase; letter-spacing: 1px; }
.pc-value { font-size: 1rem; font-weight: 600; color: #fff; }

/* ── Cabinet PC form ────────────────────────────────────────────────────── */
.specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; }
.spec-row { display: flex; flex-direction: column; gap: .3rem; }
.spec-row label { font-size: .8rem; color: var(--teal); text-transform: uppercase; letter-spacing: 1px; }
.spec-row input { background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .75rem; color: #fff; font-size: .95rem; }
.spec-row input:focus { border-color: var(--purple-light); outline: none; }

/* ── Cabinet form-row ────────────────────────────────────────────────────── */
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-group { display: flex; flex-direction: column; gap: .3rem; flex: 1; min-width: 140px; }
.form-group label { font-size: .8rem; color: var(--text-dim); }

/* ── Announcement cards ──────────────────────────────────────────────────── */
.ann-type-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: .6rem;
}
.ann-stream .ann-type-badge { background: rgba(123,47,190,.2); color: var(--purple-light); }
.ann-game   .ann-type-badge { background: rgba(0,201,177,.15); color: var(--teal); }
.ann-news   .ann-type-badge { background: rgba(255,215,0,.1);  color: #ffd700; }

.ann-stream { border-color: var(--purple) !important; }
.ann-game   { border-color: var(--teal) !important; }

.ann-event-time {
  margin-top: .5rem;
  font-size: .9rem;
  font-weight: 600;
  color: #fff;
  background: rgba(123,47,190,.2);
  border-radius: 8px;
  padding: .4rem .8rem;
  display: inline-block;
}

/* MOBILE 768px */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .nav-links { gap: .6rem; font-size: .82rem; }
  .nav-logo { font-size: 1.1rem; letter-spacing: 1px; }
  .hero { min-height: 60vh; }
  .hero-avatar { font-size: 3.5rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-buttons .btn { width: 100%; max-width: 280px; }
  .section { padding: 2rem 1rem; }
  .section-title { font-size: 1.4rem; }

  /* Игры — горизонтальная карточка на мобильном */
  .games-grid { grid-template-columns: 1fr; gap: .75rem; }
  .game-card { display: flex; flex-direction: row; align-items: flex-start; }
  .game-cover { width: 90px; aspect-ratio: 2 / 3; flex-shrink: 0; object-fit: cover; object-position: center; border-radius: var(--radius) 0 0 var(--radius); }
  .game-info { padding: .75rem; flex: 1; min-width: 0; }
  .game-info h3 { font-size: .9rem; margin-bottom: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .game-desc { font-size: .78rem; }
  .game-meta { gap: .3rem; margin-bottom: .3rem; }
  .game-date, .game-rating { font-size: .72rem; padding: 1px 6px; }
  .progress-bar { margin: .4rem 0 .2rem; }

  /* Остальные сетки */
  .cards-grid { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .pc-grid { grid-template-columns: 1fr; }
  .specs-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .stream-links { grid-template-columns: 1fr; }

  /* Реклама */
  .majestic-ad { padding: 1.2rem; }
  .majestic-ad-content { flex-direction: column; gap: 1rem; }
  .majestic-title { font-size: 1.5rem; }
  .majestic-ad-right { width: 100%; }
  .promo-code { font-size: 1.5rem; }

  /* Кабинет */
  .cabinet-section { padding: 1rem; }
  .cabinet-header { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .cabinet-actions { width: 100%; display: flex; gap: .5rem; }
  .cabinet-actions .btn { flex: 1; text-align: center; font-size: .8rem; padding: .5rem .75rem; }
  .cabinet-block { padding: 1rem; }
  .cabinet-item { flex-wrap: wrap; gap: .5rem; }
  .ci-info { width: 100%; }
  .form-inline input, .form-inline select, .form-inline textarea { min-width: 100%; }
  .form-row { flex-direction: column; gap: .5rem; }
  .form-group { min-width: 100%; }
  .edit-form input, .edit-form select { min-width: 100%; }
  .stream-card { padding: 1.2rem; gap: 1rem; }
}

/* MOBILE 480px */
@media (max-width: 480px) {
  .nav-links { gap: .4rem; font-size: .75rem; }
  .contacts-grid { grid-template-columns: 1fr; }
  .cabinet-header h2 { font-size: 1.3rem; }
  .game-cover { width: 75px; aspect-ratio: 2 / 3; }
}

/* Ann badge cabinet */
.ann-badge { font-size: .72rem; padding: 2px 7px; border-radius: 10px; }
.ann-badge.ann-stream { background: rgba(123,47,190,.2); color: var(--purple-light); }
.ann-badge.ann-game { background: rgba(0,201,177,.15); color: var(--teal); }
.ann-badge.ann-news { background: rgba(255,215,0,.1); color: #ffd700; }
