/* =============================================
   HAGERGNA GAMES — style.css
   Light, minimal, clean
   ============================================= */

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

:root {
  --color-bg: #f7f7f7;
  --color-surface: #ffffff;
  --color-border: #e5e5e5;
  --color-text: #1a1a1a;
  --color-muted: #6b6b6b;
  --color-accent: #2b7de9;
  --color-accent-dark: #1a60cc;
  --color-accent-light: #e8f0fd;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.12);
  --font: 'Inter', system-ui, sans-serif;
  --header-height: 64px;
  --max-width: 960px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
}

/* ---- LAYOUT ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- HEADER ---- */
.site-header {
  height: var(--header-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.3px;
}

.logo-accent {
  color: var(--color-accent);
}

/* ---- HERO ---- */
.hero {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 48px 0;
}

.hero-inner {
  text-align: center;
}

.hero-title {
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.hero-sub {
  font-size: 15px;
  color: var(--color-muted);
}

/* ---- GAMES SECTION ---- */
.games-section {
  padding: 40px 0 60px;
  flex: 1;
}

.section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-muted);
  margin-bottom: 20px;
}

/* ---- GAMES GRID ---- */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* ---- GAME CARD ---- */
.game-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.game-card-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.game-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-platform {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-card-desc {
  font-size: 12px;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.game-card-btn {
  margin-top: auto;
  padding-top: 10px;
}

.btn-primary {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
}

.btn-outline {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-outline:hover {
  background: var(--color-accent-light);
}

/* ---- EMPTY STATE ---- */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 60px 20px;
  color: var(--color-muted);
  font-size: 14px;
  text-align: center;
}

.empty-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  opacity: 0.25;
}

/* ---- DETAIL PAGE ---- */
.detail-page {
  background: var(--color-bg);
  min-height: calc(100vh - var(--header-height));
  padding: 32px 0 60px;
  flex: 1;
}

.detail-page.hidden {
  display: none;
}

#home-page.hidden {
  display: none;
}

.back-btn {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-accent);
  cursor: pointer;
  padding: 0;
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.15s;
}

.back-btn:hover {
  opacity: 0.7;
}

.detail-inner {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}

.detail-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  background: var(--color-accent-light);
}

.detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.detail-platform {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.detail-desc {
  font-size: 14px;
  color: var(--color-muted);
  max-width: 540px;
}

.download-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  max-width: 280px;
}

.download-links a {
  width: 100%;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 18px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-muted);
}

.footer-name {
  font-weight: 600;
  color: var(--color-text);
}

.footer-email {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-email:hover {
  text-decoration: underline;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .hero {
    padding: 32px 0;
  }

  .detail-inner {
    flex-direction: column;
  }

  .detail-img {
    width: 100%;
    height: 220px;
  }

  .download-links {
    max-width: 100%;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }
}

/* ---- UTILITY ---- */
.hidden {
  display: none !important;
}

/* =============================================
   AUTH — SIGN-IN BUTTON
   ============================================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #fff;
  color: #3c4043;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn-signin:hover {
  box-shadow: 0 1px 8px rgba(0,0,0,0.12);
  background: #f8f9fa;
}

/* =============================================
   AUTH — USER MENU & DROPDOWN
   ============================================= */

.user-menu {
  position: relative;
}

.user-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 4px 10px 4px 5px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s, box-shadow 0.15s;
}

.user-trigger:hover {
  background: var(--color-accent-light);
  box-shadow: var(--shadow);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  color: var(--color-muted);
  transition: transform 0.2s ease;
}

.user-trigger[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}

/* Dropdown panel */
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 230px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 8px;
  z-index: 300;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.user-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.dropdown-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.dropdown-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.dropdown-email {
  font-size: 11px;
  color: var(--color-muted);
  word-break: break-all;
  margin-top: 1px;
}

.dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: 5px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 6px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.dropdown-item:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.signout-item:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* =============================================
   GAME CARD ANIMATION
   ============================================= */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.game-card {
  animation: fadeInUp 0.35s ease both;
}

/* =============================================
   REVIEWS SECTION
   ============================================= */

.reviews-section {
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid var(--color-border);
}

.reviews-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 18px;
}

/* Sign-in prompt */
.review-signin-prompt {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent-light);
  border: 1px solid #c7dffb;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--color-accent-dark);
  font-weight: 500;
  margin-bottom: 20px;
}

.review-signin-prompt a {
  color: var(--color-accent);
  font-weight: 700;
}

/* Review form */
.review-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.star-rating {
  display: flex;
  gap: 3px;
  cursor: pointer;
}

.star {
  font-size: 28px;
  color: #d1d5db;
  transition: color 0.1s, transform 0.12s;
  user-select: none;
  line-height: 1;
}

.star.active {
  color: #f59e0b;
}

.star.hovered {
  color: #fbbf24;
  transform: scale(1.15);
}

.review-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  resize: vertical;
  line-height: 1.5;
  transition: border-color 0.15s;
}

.review-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.review-form-footer {
  display: flex;
  align-items: center;
  gap: 14px;
}

.review-submit {
  width: auto;
  padding: 8px 20px;
}

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

/* Review cards */
.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reviews-empty {
  font-size: 14px;
  color: var(--color-muted);
  padding: 8px 0;
}

.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  transition: box-shadow 0.15s;
}

.review-card:hover {
  box-shadow: var(--shadow);
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.review-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.review-avatar-placeholder {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.review-card-meta {
  flex: 1;
  min-width: 0;
}

.review-card-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.review-card-date {
  font-size: 11px;
  color: var(--color-muted);
}

.review-card-stars {
  font-size: 14px;
  letter-spacing: 1px;
  flex-shrink: 0;
}

.stars-filled { color: #f59e0b; }
.stars-empty  { color: #d1d5db; }

.review-card-text {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.6;
}

/* =============================================
   ADMIN PAGE
   ============================================= */

.admin-page {
  background: var(--color-bg);
  min-height: calc(100vh - var(--header-height));
  padding: 32px 0 60px;
  flex: 1;
}

.admin-page.hidden {
  display: none;
}

.admin-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.admin-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.4px;
}

.admin-badge {
  background: var(--color-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.admin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.admin-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 18px;
}

.admin-game-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-muted);
}

/* Admin form */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-form-actions .btn-primary {
  width: auto;
  padding: 9px 22px;
}

.admin-form-status {
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
}

/* Admin games list */
.admin-games-list {
  display: flex;
  flex-direction: column;
}

.admin-game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}

.admin-game-item:last-child {
  border-bottom: none;
}

.admin-game-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.admin-game-icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--color-accent-light);
  flex-shrink: 0;
}

.admin-game-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-game-platform {
  font-size: 11px;
  color: var(--color-accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.admin-no-games {
  font-size: 14px;
  color: var(--color-muted);
  padding: 6px 0;
}

.btn-delete {
  background: none;
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.12s;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-delete:hover {
  background: #fef2f2;
}

/* =============================================
   RESPONSIVE ADDITIONS
   ============================================= */

@media (max-width: 600px) {
  .user-name    { display: none; }
  .form-row     { grid-template-columns: 1fr; }
  .review-form-footer { flex-wrap: wrap; }
}

/* =============================================
   AUTH MODAL
   ============================================= */

/* Backdrop */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayIn 0.2s ease;
}

.auth-overlay.hidden {
  display: none;
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal card */
.auth-modal {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  padding: 36px 32px 28px;
  width: 100%;
  max-width: 400px;
  animation: modalIn 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* Close button */
.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

.auth-close:hover {
  color: var(--color-text);
  background: var(--color-accent-light);
}

/* Logo */
.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.auth-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* Titles */
.auth-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: -0.3px;
}

.auth-sub {
  font-size: 13px;
  color: var(--color-muted);
  text-align: center;
  margin-bottom: 22px;
}

/* View container */
.auth-view {
  display: flex;
  flex-direction: column;
}

/* Google button */
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.15s, background 0.15s;
}

.btn-google:hover {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.12);
  background: #f8f9fa;
}

.btn-google:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--color-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: relative;
}

.auth-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.label-hint {
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--color-muted);
}

.auth-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(43, 125, 233, 0.12);
}

/* Password field with toggle button */
.auth-field--password input {
  padding-right: 42px;
}

.toggle-pw {
  position: absolute;
  right: 10px;
  bottom: 9px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-muted);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.toggle-pw:hover {
  color: var(--color-text);
}

/* Error & success messages */
.auth-error {
  font-size: 13px;
  color: #dc2626;
  font-weight: 500;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0;
}

.auth-success {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #16a34a;
  font-weight: 500;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0;
}

/* Submit button */
.auth-submit {
  margin-top: 2px;
  padding: 11px;
  font-size: 14px;
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Bottom navigation links */
.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.auth-switch-sep {
  color: var(--color-border);
  font-size: 14px;
}

.auth-link {
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.auth-link:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

/* =============================================
   RESPONSIVE MODAL
   ============================================= */

@media (max-width: 480px) {
  .auth-modal {
    padding: 28px 20px 24px;
    border-radius: 12px;
  }
}

/* =============================================
   HOME TOOLBAR & FILTER TABS
   ============================================= */

.home-toolbar {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}

.toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-family: var(--font);
  font-size: 13px;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(43, 125, 233, 0.12);
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-tab {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 6px 14px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.filter-tab.active {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* =============================================
   TAG CHIPS & CARD BADGES
   ============================================= */

.tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.tag-category {
  background: #e0f2fe;
  color: #0369a1;
}

.tag-platform {
  background: #f1f5f9;
  color: #475569;
}

.tag-web {
  background: #dcfce7;
  color: #15803d;
}

.tag-android {
  background: #fef3c7;
  color: #b45309;
}

.tag-featured {
  background: #fef08a;
  color: #854d0e;
}

.game-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  z-index: 2;
}

.game-card-img-wrap {
  position: relative;
}

.game-card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.btn-play-online {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  font-size: 14px;
  padding: 11px 16px;
}

.btn-play-online:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

/* =============================================
   ADMIN RECONSTRUCTION STYLES
   ============================================= */

.admin-subtitle {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 2px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-accent);
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 6px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-card-header .admin-card-title {
  margin-bottom: 0;
}

.admin-search-wrap input {
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 12px;
  font-family: var(--font);
  background: var(--color-bg);
  min-width: 200px;
}

.flex-center-group {
  justify-content: center;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px !important;
  text-transform: none !important;
  color: var(--color-text) !important;
  font-weight: 600 !important;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

/* Image Upload & Preview */
.image-upload-wrap {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px;
}

.icon-preview-box {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #fff;
  flex-shrink: 0;
}

.icon-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-upload-inputs {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-file-upload {
  display: inline-block;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-file-upload:hover {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.hidden-file-input {
  display: none;
}

.file-chosen-name {
  font-size: 11px;
  color: var(--color-muted);
  word-break: break-all;
}

/* Admin Item Actions */
.admin-game-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-mini {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-web { background: #dcfce7; color: #166534; }
.badge-apk { background: #fef3c7; color: #92400e; }

.admin-game-meta {
  font-size: 12px;
  color: var(--color-muted);
  margin-top: 2px;
}

.admin-game-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-action {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}

.btn-test-play {
  border-color: #bbf7d0;
  color: #15803d;
}
.btn-test-play:hover { background: #f0fdf4; }

.btn-edit {
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.btn-edit:hover { background: #eff6ff; }

/* =============================================
   WEB GAME PLAY MODAL
   ============================================= */

.game-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.game-modal-overlay.hidden {
  display: none;
}

.game-modal-container {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.game-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.game-modal-title {
  color: #f8fafc;
  font-size: 16px;
  font-weight: 700;
}

.game-modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
}

.game-modal-close:hover {
  color: #fff;
}

.game-modal-body {
  flex: 1;
  width: 100%;
  height: 100%;
  background: #000;
}

.game-modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

