/* === ОСНОВА === */
:root {
  --page-max: 1200px;
  --page-pad: 80px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Rubik', sans-serif;
}

body {
  background: #0d0d0d;
  color: #f5f5f5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

/* ФОН */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, #151515, #0b0b0b 80%);
  z-index: -2;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: -1;
}

/* === ЧАСТИЦЫ === */
.particles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.particle {
  position: absolute;
  background: rgba(255, 165, 0, 0.5);
  border-radius: 50%;
}
@keyframes float {
  0% { transform: translate(0, 0); opacity: 0.5; }
  50% { transform: translate(20px, -100px); opacity: 0.8; }
  100% { transform: translate(0, -200px); opacity: 0; }
}

/* === HEADER === */
.navbar {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 14px 0;
  background: transparent;
  border-bottom: 1px solid rgba(255, 165, 0, 0.2);
}
.navbar-inner {
  width: 100%;
  max-width: var(--page-max);
  padding: 0 var(--page-pad);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.navbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-right: 60px;
}
.logo-btn {
  background: none;
  border: none;
  color: #ffa500;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}
.logo-btn:hover {
  color: #ffcc66;
  text-shadow: 0 0 8px #ffa500;
}
.search {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 165, 0, 0.3);
  background: rgba(20, 20, 20, 0.8);
  color: #fff;
  outline: none;
}
.search::placeholder { color: #888; }
.dropdown { position: relative; display: inline-block; }
.help-btn {
  background: none;
  border: none;
  color: #ffa500;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s;
}
.help-btn:hover { color: #ffcc66; text-shadow: 0 0 8px #ffa500; }

.dropdown-content a {
  display: block;
  padding: 8px 16px;
  color: #eee;
  text-decoration: none;
  font-size: 14px;
  transition: 0.2s;
}
.dropdown-content a:hover {
  background: rgba(255, 165, 0, 0.1);
  color: #ffa500;
}
.show {
  display: block;
  animation: fadeIn 0.15s ease-in-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 26px;
}
.navbar-right a {
  color: #ffa500;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: 0.3s;
}
.navbar-right a:hover {
  color: #ffcc66;
  text-shadow: 0 0 8px #ffa500;
}
.balance {
  background: rgba(255, 165, 0, 0.12);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #ffa500;
  border: 1px solid rgba(255, 165, 0, 0.3);
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.1);
}
/* === MAIN === */
.main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  max-width: var(--page-max);
  padding: 40px var(--page-pad);
  margin: 0 auto;
  width: 100%;
}
.content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  width: 100%;
}
.game-card {
  background: rgba(26, 26, 26, 0.85);
  border-left: 4px solid #ffa500;
  border-radius: 10px;
  padding: 18px 20px;
  width: 260px;
  height: 150px;
  box-shadow: 0 0 15px rgba(255, 165, 0, 0.15);
  transition: 0.3s;
}
.game-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(255, 165, 0, 0.5);
}
.game-card .links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  line-height: 1.5;
}
.game-card .links a {
  color: #ffcc66;
  text-decoration: none;
  font-size: 14px;
}
.game-card .links a:hover { color: #ffa500; text-shadow: 0 0 6px #ffa500; }

/* === AUTH PAGES === */
.auth-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}
.auth-card {
  background: rgba(26, 26, 26, 0.92);
  border: 1px solid rgba(255, 165, 0, 0.3);
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(255, 165, 0, 0.2);
  width: 360px;
  padding: 30px 28px;
  text-align: center;
  backdrop-filter: blur(6px);
}
.auth-card h2 { color: #ffa500; margin-bottom: 20px; }
.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-card input {
  padding: 10px 12px;
  border: 1px solid rgba(255, 165, 0, 0.3);
  border-radius: 6px;
  background: rgba(15, 15, 15, 0.9);
  color: #fff;
  outline: none;
}
.auth-card button {
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: #ffa500;
  color: #000;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}
.auth-card button:hover {
  background: #ffcc66;
  transform: scale(1.03);
}
.auth-card .switch-link {
  margin-top: 10px;
  font-size: 14px;
}
.auth-card .switch-link a {
  color: #ffcc66;
  text-decoration: none;
}
.auth-card .switch-link a:hover {
  color: #ffa500;
  text-shadow: 0 0 8px #ffa500;
}

/* === FOOTER === */
.footer {
  margin-top: auto;
  text-align: center;
  color: #999;
  padding: 20px;
  border-top: 1px solid rgba(255, 165, 0, 0.2);
}
.footer .highlight { color: #ffa500; font-weight: 700; }


.flash-messages{margin-bottom:10px}.flash{padding:10px 14px;border-radius:6px;font-size:14px;text-align:center;margin-bottom:6px}.flash-error{background:rgba(255,0,0,0.15);border:1px solid rgba(255,0,0,0.3);color:#ff4d4d;box-shadow:0 0 12px rgba(255,0,0,0.2)}.flash-success{background:rgba(0,255,0,0.1);border:1px solid rgba(0,255,0,0.3);color:#66ff66;box-shadow:0 0 12px rgba(0,255,0,0.2)}.flash-warning{background:rgba(255,165,0,0.1);border:1px solid rgba(255,165,0,0.3);color:#ffa500;box-shadow:0 0 10px rgba(255,165,0,0.15)}

.game-card h3 {
  margin-bottom: 14px; /* увеличено расстояние между названием и ссылками */
}

/* Названия игр — как кнопки услуг */
.game-card .game-link {
  color: #ffcc66;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  transition: 0.2s;
}

.game-card .game-link:hover {
  color: #ffa500;
  text-shadow: 0 0 6px #ffa500;
}


/* Таблица объявлений */
.listing-head{
  font-weight:700;
  color:#ffcc66;
  border-bottom:1px solid rgba(255,165,0,.2);
  padding-bottom:8px;
  margin-bottom:8px
}
.listing-row{
  background:rgba(26,26,26,.85);
  border:1px solid rgba(255,165,0,.2);
  border-radius:8px;
  padding:12px;
  width: 100%
}
.ta-right{
  text-align:right
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

.profile-icon:hover {
    transform: scale(1.1);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    min-width: 160px;
    z-index: 999;
    right: 0;
    top: 110%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.dropdown-content a {
    color: #ffcc66;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    transition: background 0.2s ease;
}

.dropdown-content a:hover {
    background-color: #2a2a2a;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a.logout-link {
  color: #ff6b6b;
  transition: all 0.25s ease;
  font-weight: 500;
}

.dropdown-content a.logout-link:hover {
  text-shadow: 0 0 8px #ff4d4d; /* красная подсветка вместо золотой */
  color: #ff6b6b; /* чуть мягче по цвету, чтобы гармонично светилась */
}

/* === PROFILE PAGE === */
.profile-page {
  max-width: 1000px;
  margin: 30px auto;
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(255,165,0,0.2);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255,165,0,0.1);
  overflow: hidden;
}

.profile-banner img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid rgba(255,165,0,0.2);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 30px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 2px solid #ffa500;
}

.profile-info .nickname {
  font-size: 24px;
  font-weight: 700;
  color: #ffcc66;
}
.status {
  font-size: 14px;
  color: #66ff66;
}
.offers-table th {
  color: #ffa500;
  text-align: left;
}

.offers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.profile-section {
    margin-top: 30px;
    padding: 20px;
    background: #141414;
    border-radius: 12px;
}

.game-block {
    margin-bottom: 40px;
}

.category-block {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 3px solid #ffb300;
}

.offers-table th,
.offers-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #333;
}

.status.online { color: #2ecc71; }
.status.offline { color: #e74c3c; }

.upload-btn {
  background: #ffa500;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  color: #000;
  font-weight: 700;
  cursor: pointer;
  margin-left: 10px;
  transition: 0.3s;
}
.upload-btn:hover {
  background: #ffcc66;
  transform: scale(1.05);
}
input[type="file"] {
  color: #ddd;
  background: rgba(30,30,30,0.8);
  border: 1px solid rgba(255,165,0,0.3);
  padding: 6px;
  border-radius: 6px;
}

/* === АВАТАР И КНОПКА РЕДАКТИРОВАНИЯ === */
.avatar-container {
  position: relative;
  display: inline-block;
}
.edit-avatar-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #007bff;
  border: none;
  color: white;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0,0,0,0.3);
  transition: 0.2s;
}
.edit-avatar-btn:hover { background: #3399ff; transform: scale(1.1); }

/* === МОДАЛЬНОЕ ОКНО === */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-content {
  background: #1a1a1a;
  border-radius: 10px;
  border: 1px solid rgba(255,165,0,0.2);
  padding: 20px 30px;
  width: 360px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0,0,0,0.5);
}
.modal-content h2 {
  color: #ffcc66;
  margin-bottom: 20px;
}
.drop-zone {
  border: 2px dashed rgba(255,165,0,0.3);
  border-radius: 10px;
  padding: 40px 20px;
  color: #aaa;
  transition: 0.3s;
  cursor: pointer;
}
.drop-zone.drag-over {
  border-color: #ffa500;
  background: rgba(255,165,0,0.05);
}
.modal-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.btn {
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s;
}
.btn.cancel { background: #555; color: #eee; }
.btn.cancel:hover { background: #666; }
.btn.save { background: #ffa500; color: #000; }
.btn.save:hover { background: #ffcc66; transform: scale(1.05); }

/* === КАТЕГОРИИ / ФИЛЬТРЫ / ТАБЛИЦА === */

.category-container {
  display: block;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 40px;
}

/* === ВКЛАДКИ КАТЕГОРИЙ === */
.service-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px; /* 🔽 немного больше отступ — чтобы было место для фильтров */
}

.pill-btn {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 165, 0, 0.3);
  color: #ffcc66;
  background: rgba(26, 26, 26, 0.85);
  text-decoration: none;
  transition: 0.25s;
  font-weight: 500;
}

.pill-btn:hover {
  color: #ffa500;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.25);
}

.pill-active {
  background: #ffa500;
  color: #000;
  border-color: #ffa500;
}

/* === ПАНЕЛЬ ФИЛЬТРОВ === */
.filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 12px; /* 🔽 фильтры немного ниже */
  margin-bottom: 26px;
  flex-wrap: nowrap;
  width: 100%;
}

/* Левая часть — платформа и чекбокс */
.filters-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-grow: 1;
  white-space: nowrap;
}

/* Правая часть — кнопка */
.filters-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* === Селектор платформы (в стиле "Помощь" — золотой контур и подсветка) === */
.filter-select {
  background: none;
  border: none;
  color: #ffa500;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

.filter-select:hover { color: #ffcc66; text-shadow: 0 0 8px #ffa500; }

/* Чекбокс справа от селектора */
.online-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ccc;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.online-toggle:hover {
  color: #ffcc66;
}

.online-toggle input {
  accent-color: #ffa500;
  transform: scale(1.1);
  margin-top: 0;
}

/* === Кнопка "Продать" === */
.filters-right .pill-btn {
  background: rgba(255, 165, 0, 0.15);
  border: 1px solid rgba(255, 165, 0, 0.3);
  color: #ffcc66;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 500;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.filters-right .pill-btn:hover {
  background: #ffa500;
  color: #000;
  border-color: #ffa500;
  box-shadow: 0 0 10px rgba(255, 165, 0, 0.35);
  transform: translateY(-1px);
}

/* === ТАБЛИЦА ЛОТОВ === */
.listing-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row {
  display: grid;
  grid-template-columns: 10% 1fr 25% 10%;
  align-items: start;
  gap: 45px;
  padding: 10px 14px;
  background: #111;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.listing-row:hover {
  background: #1b1b1b;
}

/* === ОПИСАНИЕ === */
.listing-description {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
  font-size: 0.95rem;
  color: #eee;
  max-width: 420px;
  height: 100%;
  display: block;
}

/* === ПРОДАВЕЦ === */
.seller-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.seller-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #111;
}

.status-dot.online { background: #2ecc71; }
.status-dot.offline { background: #555; }

.seller-name {
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.seller-name.online-name { color: #f5f5f5; }
.seller-name.offline-name { color: #888; }

/* === ПАГИНАЦИЯ === */
.pagination {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.pagination .pill-btn {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
}

.disabled-btn {
  background: #333 !important;
  color: #888 !important;
  border-color: #222 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

.page-indicator {
  color: #aaa;
  font-size: 0.9rem;
}

/* === ПУСТОЙ СПИСОК === */
.empty-box {
  background: rgba(26, 26, 26, 0.85);
  border: 1px dashed rgba(255, 165, 0, 0.3);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  color: #bbb;
}

/* === АДАПТИВ === */
@media (max-width: 900px) {
  .filters-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 8px;
  }

  .filters-left {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .filters-right {
    width: 100%;
    justify-content: flex-end;
  }
}

.game-list {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  width: 100%;
}

.logo-image {
  height: 25px;       /* высота логотипа */
  width: auto;        /* чтобы не искажался */
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.logo-image:hover {
  transform: scale(1.05);
}