/* assets/css/style.css - Poki Style Modern Dark Theme */

:root {
  --bg-dark: #0a0e17;
  --bg-surface: #111827;
  --bg-card: #182234;
  --bg-card-hover: #1f2d45;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 240, 255, 0.35);
  --primary: #00f0ff;
  --primary-hover: #38bdf8;
  --accent-purple: #a855f7;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-orange: #f97316;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* LIGHT THEME VARIABLES */
[data-theme="light"] {
  --bg-dark: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-glow: rgba(2, 132, 199, 0.25);
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --card-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .brand-text {
  background: linear-gradient(90deg, #0f172a, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .search-input {
  background: #f8fafc;
  border-color: rgba(0, 0, 0, 0.12);
  color: #0f172a;
}

[data-theme="light"] .search-input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.2);
}

[data-theme="light"] .cat-pill {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.09);
  color: #475569;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .cat-pill:hover,
[data-theme="light"] .cat-pill.active {
  background: #f0f9ff;
  border-color: var(--primary);
  color: var(--primary);
}

[data-theme="light"] .game-card {
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(0, 0, 0, 0.07);
}

[data-theme="light"] .game-card-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(15, 23, 42, 0.88) 100%);
}

[data-theme="light"] .site-footer {
  background: #e2e8f0;
  border-top: 1px solid #cbd5e1;
}

[data-theme="light"] .footer-col h4 {
  color: #0f172a;
}

/* Light theme — game page & readable controls */
[data-theme="light"] .game-title-group h1,
[data-theme="light"] .game-details-card h3,
[data-theme="light"] .related-info h4,
[data-theme="light"] .comments-title {
  color: var(--text-main);
}

[data-theme="light"] .game-action-bar,
[data-theme="light"] .game-details-card,
[data-theme="light"] .comments-section,
[data-theme="light"] .related-card {
  box-shadow: var(--card-shadow);
}

[data-theme="light"] .action-btn {
  background: #f1f5f9;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .action-btn:hover {
  background: #e0f2fe;
  color: var(--primary);
  border-color: var(--primary);
}

[data-theme="light"] .action-btn.fullscreen-btn {
  color: #0a0e17;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

[data-theme="light"] .game-details-card p {
  color: #475569;
}

[data-theme="light"] .controls-box {
  background: #f8fafc;
  color: #334155;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-left: 4px solid var(--primary);
}

[data-theme="light"] .game-category-tag span {
  color: var(--text-muted) !important;
}

[data-theme="light"] .comment-author,
[data-theme="light"] .comment-content {
  color: var(--text-main);
}

[data-theme="light"] .btn-comment-menu:hover,
[data-theme="light"] .btn-comment-menu[aria-expanded="true"] {
  background: rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .comment-textarea {
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  color: var(--text-main);
}

[data-theme="light"] .comment-textarea:focus {
  background: #fff;
}

[data-theme="light"] .btn-toggle-comments-section {
  background: #f8fafc;
  color: #475569;
}

[data-theme="light"] .section-title {
  color: var(--text-main);
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* NAVBAR */
.navbar {
  position: relative;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
}

.nav-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #00f0ff, #a855f7);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #0a0e17;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transition: var(--transition-bounce);
}

.brand:hover .brand-icon {
  transform: rotate(10deg) scale(1.08);
}

.brand-text {
  background: linear-gradient(90deg, #ffffff, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 11px;
  text-transform: uppercase;
  background: rgba(0, 240, 255, 0.15);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-left: 6px;
}

/* Custom logo sits in the same slot as .brand-icon; title + PRO tag always visible */
.brand.brand--custom-logo {
  flex-shrink: 0;
}

.brand-logo-wrap {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(168, 85, 247, 0.12));
  border: 1px solid var(--border-color);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.2);
}

.brand-logo-wrap .brand-logo-custom {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
}

.brand.brand--custom-logo:hover .brand-logo-wrap {
  transform: rotate(2deg) scale(1.04);
  transition: var(--transition-bounce);
}

[data-theme="light"] .brand-logo-wrap {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.1), rgba(99, 102, 241, 0.08));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* SEARCH BAR */
.search-wrapper {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-box {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  font-size: 16px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 12px 18px 12px 46px;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
  background: #141c2d;
}

.search-results-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: linear-gradient(165deg, rgba(20, 28, 45, 0.98), rgba(12, 16, 28, 0.98));
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(168, 85, 247, 0.08);
  overflow: hidden;
  z-index: 200;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.search-results-dropdown[hidden] {
  display: none !important;
}

.search-results-dropdown:not([hidden]) {
  display: block;
}

.search-results-scroll {
  max-height: min(380px, 55vh);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 6px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 240, 255, 0.65) rgba(255, 255, 255, 0.06);
}

.search-results-scroll::-webkit-scrollbar {
  width: 9px;
}

.search-results-scroll::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  margin: 8px 2px;
}

.search-results-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, #00f0ff 0%, #6366f1 55%, #a855f7 100%);
  border: 2px solid rgba(10, 14, 23, 0.85);
  background-clip: padding-box;
}

.search-results-scroll::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  background-clip: padding-box;
}

[data-theme="light"] .search-results-dropdown {
  background: linear-gradient(165deg, #ffffff, #f1f5f9);
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .search-results-scroll {
  scrollbar-color: rgba(14, 165, 233, 0.75) rgba(15, 23, 42, 0.08);
}

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 4px;
}

.search-results-header span:last-child {
  color: var(--primary);
  font-size: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}

.search-results-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .search-results-footer {
  background: rgba(15, 23, 42, 0.04);
}

.search-see-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.2);
  transition: var(--transition-fast);
}

.search-see-all:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--primary);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.search-result-item:last-child {
  margin-bottom: 0;
}

.search-result-item:hover,
.search-result-item:focus-visible {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.2);
  outline: none;
}

.search-result-empty,
.search-result-loading {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.search-result-loading i {
  color: var(--primary);
  margin-right: 8px;
}

.search-result-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
}

.search-result-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.search-result-info span {
  font-size: 12px;
  color: var(--text-muted);
}

/* CATEGORIES MEGA DROPDOWN IN HEADER */
.categories-nav-wrapper {
  position: relative;
}

.btn-categories {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 10px 16px;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-categories:hover,
.categories-nav-wrapper:hover .btn-categories {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-card-hover);
}

.categories-mega-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: min(620px, calc(100vw - 32px));
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  overflow: hidden; /* Hide any container overflow */
}

.categories-nav-wrapper:hover .categories-mega-menu,
.categories-mega-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.categories-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.categories-menu-header h4 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.categories-menu-header a {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
}

.categories-grid-dropdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  overflow-x: hidden; /* Strict: Never show horizontal scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.categories-grid-dropdown::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

@media (max-width: 640px) {
  .categories-mega-menu {
    width: 320px;
  }
  .categories-grid-dropdown {
    grid-template-columns: 1fr;
  }
}

.cat-drop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid transparent;
  transition: var(--transition-fast);
}

.cat-drop-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateX(3px);
}

.cat-drop-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.cat-drop-text {
  display: flex;
  flex-direction: column;
}

.cat-drop-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.cat-drop-count {
  font-size: 11px;
  color: var(--text-muted);
}

/* THEME SWITCHER BUTTON */
.theme-toggle-btn {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
}

.theme-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(25deg) scale(1.08);
}

/* USER PROFILE & AUTH BUTTONS */
.user-menu-wrapper {
  position: relative;
}

.user-badge-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px 14px 6px 6px;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: var(--transition-fast);
}

.user-badge-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

a.user-badge-link {
  text-decoration: none;
  color: inherit;
}

.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--primary);
}

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

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 210px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 8px;
  display: none;
  z-index: 500;
  flex-direction: column;
  gap: 4px;
}

.user-menu-wrapper:hover .user-dropdown-menu,
.user-dropdown-menu.show {
  display: flex;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.user-dropdown-item:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
}

/* AUTH MODAL STYLES */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

.auth-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 25px rgba(0, 240, 255, 0.15);
  width: 100%;
  max-width: 440px;
  padding: 30px;
  position: relative;
  animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Confirm / delete modal */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10050;
  padding: 20px;
}

.confirm-modal {
  background: linear-gradient(165deg, var(--bg-surface), rgba(15, 23, 42, 0.98));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(248, 113, 113, 0.12);
  width: 100%;
  max-width: 400px;
  padding: 28px 26px 24px;
  position: relative;
  text-align: center;
  animation: modalPop 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-modal-danger {
  border-color: rgba(248, 113, 113, 0.35);
}

.confirm-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.confirm-modal-close:hover {
  color: #f87171;
  transform: rotate(90deg);
}

.confirm-modal-icon-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  box-shadow: 0 0 24px rgba(248, 113, 113, 0.15);
}

.confirm-modal h3 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.confirm-modal-text {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

.confirm-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.confirm-btn-cancel,
.confirm-btn-danger {
  flex: 1 1 120px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.confirm-btn-cancel {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}

.confirm-btn-cancel:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.confirm-btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.confirm-btn-danger:hover {
  background: linear-gradient(135deg, #f87171, #ef4444);
  transform: translateY(-1px);
}

.confirm-btn-danger:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.auth-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
}

.auth-modal-close:hover {
  color: #ef4444;
  transform: rotate(90deg);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.auth-tab-btn {
  flex: 1;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-muted);
  padding: 8px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.auth-tab-btn.active {
  color: var(--primary);
  background: rgba(0, 240, 255, 0.1);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  padding: 12px;
  border-radius: var(--radius-xl);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-google:hover {
  background: #f9fafb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

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

.auth-divider span {
  padding: 0 12px;
}

.auth-input-group {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.2);
}

.auth-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #00f0ff, #3b82f6);
  color: #0a0e17;
  border: none;
  padding: 13px;
  border-radius: var(--radius-xl);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.35);
  margin-top: 8px;
}

.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.auth-guest-hint {
  text-align: center;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* NAV ACTIONS */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 10px 18px;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn-random {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border: none;
  color: #fff;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.35);
}

.btn-random:hover {
  background: linear-gradient(135deg, #c084fc, #818cf8);
  color: #fff;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
  transform: translateY(-2px) scale(1.02);
}

/* CATEGORY BAR / PILLS */
.category-bar-wrapper {
  background: rgba(17, 24, 39, 0.6);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 24px;
}

.category-bar {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  transition: var(--transition-fast);
}

.cat-pill i {
  font-size: 14px;
}

.cat-pill:hover,
.cat-pill.active {
  background: var(--bg-card-hover);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.15);
}

.cat-pill.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(168, 85, 247, 0.2));
  color: var(--primary);
  border-color: var(--primary);
}

/* MAIN CONTENT LAYOUT */
.main-wrapper {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  flex: 1;
  width: 100%;
}

/* SECTION TITLES */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-title i {
  color: var(--primary);
}

/* POKI BENTO GRID */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: 180px;
  grid-auto-flow: dense;
  gap: 16px;
}

/* GRID SIZES (BENTO / MASONRY) */
.game-card.wide {
  grid-column: span 2;
}

.game-card.tall {
  grid-row: span 2;
}

.game-card.large {
  grid-column: span 2;
  grid-row: span 2;
}

/* Mobile bento — same wide / tall / large layout as desktop, scaled down */
@media (max-width: 640px) {
  .game-grid:not(.profile-fav-grid) {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 86px;
    grid-auto-flow: dense;
    gap: 7px;
  }

  .game-grid:not(.profile-fav-grid) .game-card.wide {
    grid-column: span 2;
    grid-row: span 1;
  }

  .game-grid:not(.profile-fav-grid) .game-card.tall {
    grid-column: span 1;
    grid-row: span 2;
  }

  .game-grid:not(.profile-fav-grid) .game-card.large {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* GAME CARD */
.game-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(0, 240, 255, 0.25);
  z-index: 10;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card-img {
  transform: scale(1.08);
}

.game-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(10, 14, 23, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  transition: opacity 0.2s ease;
}

.card-top-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.card-badge.featured {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  border: none;
}

.card-badge.trending {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #fff;
  border: none;
}

.card-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.7);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.9);
  color: #0a0e17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.8);
  opacity: 0;
  transition: var(--transition-bounce);
}

.game-card:hover .card-play-btn {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-bottom-info {
  margin-top: auto;
}

.card-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #10b981;
  font-weight: 700;
}

/* SINGLE GAME PLAYER PAGE */
.game-play-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .game-play-layout {
    grid-template-columns: 1fr;
  }
}

.game-player-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.game-screen-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 65%; /* 16:9-ish ratio */
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  isolation: isolate;
}

.game-screen-wrapper.theater-mode {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  padding-bottom: 0;
  z-index: 9999;
  border-radius: 0;
  border: none;
}

.game-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  touch-action: manipulation;
  background: #000;
}

/* GAME ACTION BAR */
.game-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.game-title-group h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.game-category-tag {
  font-size: 13px;
  color: var(--primary);
  font-weight: 700;
  margin-top: 2px;
}

.game-buttons-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
}

.action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.action-btn.liked {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #10b981;
}

.action-btn.disliked {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.action-btn.fullscreen-btn {
  background: linear-gradient(135deg, #00f0ff, #3b82f6);
  border: none;
  color: #0a0e17;
  box-shadow: 0 4px 15px rgba(0, 240, 255, 0.4);
}

.action-btn.fullscreen-btn:hover {
  transform: translateY(-2px) scale(1.03);
}

/* GAME INFO / DETAILS CARD */
.game-details-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-details-card h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-details-card p {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 14.5px;
}

.controls-box {
  background: var(--bg-card-hover);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  border-left: 4px solid var(--primary);
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.5;
}

/* SIDEBAR RELATED GAMES */
.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px;
  transition: var(--transition-fast);
}

.related-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateX(4px);
}

.related-thumb {
  width: 70px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
}

.related-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.related-info span {
  font-size: 12px;
  color: var(--text-muted);
}

/* FOOTER */
.site-footer {
  background: #080c14;
  border-top: 1px solid var(--border-color);
  padding: 40px 24px 24px;
  margin-top: 60px;
}

.footer-container {
  max-width: 1440px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 400px;
}

.footer-col h4 {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 14px;
  transition: var(--transition-fast);
}

.footer-col a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1440px;
  margin: 20px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 10px;
}

/* TOAST NOTIFICATION */
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-surface);
  border: 1px solid var(--primary);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.3);
  z-index: 10000;
  display: none;
  animation: slideUp 0.3s ease;
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.gamepix-skeletons {
  display: contents;
}

.skeleton-card {
  min-height: 180px;
  background: linear-gradient(90deg, #182234 25%, #233148 50%, #182234 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* INFINITE SCROLL & SKELETON ANIMATIONS */
.fade-in-card {
  animation: cardFadeIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

.scroll-sentinel {
  grid-column: 1 / -1;
  height: 30px;
  visibility: hidden;
  pointer-events: none;
}

.infinite-end-badge {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 20px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  display: none;
}

.infinite-end-badge i {
  color: var(--primary);
  margin-right: 6px;
}


/* ==========================================================
   YOUTUBE-STYLE NESTED COMMENTS & ACTIVE ACTION BUTTONS
   ========================================================== */

.action-btn.liked {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
  background: rgba(0, 240, 255, 0.12) !important;
}

.action-btn.favorited {
  color: #ec4899 !important;
  border-color: #ec4899 !important;
  background: rgba(236, 72, 153, 0.12) !important;
}

.comments-section {
  margin-top: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.comments-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.comments-title i {
  color: var(--primary);
}

/* Top Comment Input Box (For Logged In) */
.comment-input-box {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.comments-compose-section {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.comment-input-box-bottom {
  margin-bottom: 0;
}

.comment-guest-prompt-bottom {
  margin-top: 0;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
}

.comment-avatar.small {
  width: 32px;
  height: 32px;
}

.comment-form-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  outline: none;
  transition: all 0.2s ease;
}

.comment-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.15);
  background: var(--bg-surface);
}

.comment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-comment-cancel {
  padding: 8px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-comment-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

.btn-comment-submit {
  padding: 8px 18px;
  border-radius: 20px;
  border: none;
  background: var(--primary);
  color: #050b14;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-comment-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-comment-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Guest Sign-in Banner */
.comment-guest-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.06), rgba(168, 85, 247, 0.06));
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.guest-avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  flex-shrink: 0;
}

.guest-prompt-text {
  flex: 1;
  min-width: 200px;
}

.guest-prompt-text strong {
  display: block;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
}

.guest-prompt-text p {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}

.btn-signin-comment {
  padding: 9px 18px;
  border-radius: 20px;
  border: none;
  background: var(--primary);
  color: #050b14;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-signin-comment:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 240, 255, 0.3);
}

/* Comments List */
.comments-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.comment-item.reply-item {
  gap: 12px;
  padding-top: 8px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.comment-author {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
}

.comment-time {
  font-size: 12px;
  color: var(--text-muted);
}

.comment-content {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-main);
  word-break: break-word;
  white-space: pre-line;
}

.comment-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.comment-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 12px;
  transition: all 0.2s;
}

.comment-action-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

.comment-action-btn.liked {
  color: var(--primary);
}

.comment-action-btn.liked i {
  font-weight: 900;
}

/* Inline Reply Box */
.reply-input-wrapper {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  animation: fadeInReply 0.2s ease;
}

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

.reply-guest-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 13px;
  color: var(--text-muted);
}

.btn-signin-sm {
  padding: 6px 14px;
  border-radius: 16px;
  background: var(--primary);
  color: #050b14;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

/* Nested Replies Container */
.replies-container {
  margin-left: 56px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (max-width: 640px) {
  .replies-container {
    margin-left: 20px;
  }
  .comments-section {
    padding: 16px;
  }
}

.btn-toggle-replies {
  align-self: flex-start;
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 16px;
  transition: background 0.2s;
}

.btn-toggle-replies:hover {
  background: rgba(0, 240, 255, 0.1);
}

.replies-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 2px solid var(--border-color);
  padding-left: 14px;
  margin-top: 4px;
}

.no-comments-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.no-comments-placeholder i {
  font-size: 40px;
  color: var(--border-color);
  margin-bottom: 12px;
  display: block;
}

.no-comments-placeholder p {
  font-size: 14.5px;
}


/* ==========================================================
   COMMENT THREE-DOTS MENU, EDIT/DELETE & COLLAPSE TOGGLES
   ========================================================== */

.btn-toggle-comments-section {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-toggle-comments-section:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(0, 240, 255, 0.08);
}

.comments-collapsible-body {
  transition: all 0.3s ease;
}

.comments-collapsible-body.collapsed {
  display: none;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  position: relative;
}

.comment-edited-tag {
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.85;
}

.comment-thread.comment-editing,
.comment-item.reply-item.comment-editing {
  border-radius: var(--radius-md);
  outline: 2px solid rgba(0, 240, 255, 0.45);
  outline-offset: 2px;
  background: rgba(0, 240, 255, 0.06);
}

.comment-input-box.comment-main-editing .comment-textarea {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.15);
}

.comment-menu-wrapper {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-comment-menu {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-comment-menu:hover,
.btn-comment-menu[aria-expanded="true"] {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
}

.comment-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 6px;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  z-index: 120;
  display: none;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.comment-dropdown.show {
  display: flex;
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.comment-meta {
  overflow: visible;
}

.comment-dropdown-item {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.2s ease;
}

.comment-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--primary);
}

.comment-dropdown-item.delete {
  color: #fca5a5;
}

.comment-dropdown-item.delete:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #ef4444;
}

.comment-edit-box {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-fade-out {
  animation: commentFadeOut 0.35s ease forwards;
}

@keyframes commentFadeOut {
  from { opacity: 1; transform: scale(1); max-height: 200px; }
  to { opacity: 0; transform: scale(0.95); max-height: 0; margin: 0; padding: 0; overflow: hidden; }
}

/* ==========================================================
   RESPONSIVE — TABLET & MOBILE (site + shared utilities)
   ========================================================== */

@media (max-width: 1024px) {
  .navbar {
    padding: 10px 16px;
  }

  .nav-container {
    flex-wrap: wrap;
    gap: 10px 12px;
  }

  .brand {
    font-size: 20px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .brand-logo-wrap {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .nav-actions {
    flex-shrink: 0;
    order: 2;
  }

  .brand {
    order: 1;
  }

  .categories-nav-wrapper {
    order: 3;
    flex: 0 0 auto;
  }

  .search-wrapper {
    order: 4;
    flex: 1 1 140px;
    max-width: none;
    min-width: 0;
  }

  .categories-mega-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    width: auto;
    max-height: min(70vh, 520px);
    overflow-y: auto;
  }

  .categories-grid-dropdown {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-container {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "search search"
      "cats cats";
    gap: 10px;
    align-items: center;
  }

  .brand {
    grid-area: brand;
    order: unset;
    flex: unset;
  }

  .nav-actions {
    grid-area: actions;
    order: unset;
    justify-self: end;
  }

  .search-wrapper {
    grid-area: search;
    order: unset;
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: unset;
  }

  .categories-nav-wrapper {
    grid-area: cats;
    order: unset;
    width: 100%;
  }

  .btn-categories {
    width: 100%;
    justify-content: center;
  }

  .main-wrapper {
    padding: 16px 12px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .section-title {
    font-size: 18px;
  }

  .game-title-group h1 {
    font-size: 18px;
    line-height: 1.25;
  }

  .game-action-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 12px;
  }

  .game-title-group {
    width: 100%;
  }

  .game-category-tag {
    font-size: 12px;
    line-height: 1.4;
  }

  .game-buttons-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .game-action-bar .action-btn {
    flex: none;
    width: 100%;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: var(--radius-md);
  }

  .game-action-bar .action-btn.fullscreen-btn {
    grid-column: 1 / -1;
    min-height: 46px;
  }

  .comments-section {
    padding: 16px 14px;
    margin-top: 16px;
  }

  .comments-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .comments-title {
    font-size: 17px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .btn-toggle-comments-section {
    flex: 1 1 100%;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    font-size: 12.5px;
  }

  .comment-input-box {
    gap: 10px;
    margin-bottom: 20px;
    align-items: flex-start;
  }

  .comment-avatar {
    width: 38px;
    height: 38px;
    margin-top: 2px;
  }

  .comment-form-wrapper {
    min-width: 0;
    width: 100%;
  }

  .comment-textarea {
    min-height: 80px;
    font-size: 16px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
  }

  .comment-actions {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }

  .btn-comment-cancel,
  .btn-comment-submit {
    flex: 1 1 0;
    min-height: 42px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .comment-meta {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 4px;
    padding-right: 4px;
  }

  .comment-author {
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .comment-time,
  .comment-edited-tag {
    font-size: 11px;
  }

  .comment-menu-wrapper {
    margin-left: auto;
  }

  .comment-content {
    font-size: 14px;
    line-height: 1.5;
  }

  .comment-footer {
    flex-wrap: wrap;
    gap: 10px;
  }

  .reply-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .reply-input-wrapper .comment-avatar.small {
    display: none;
  }

  .replies-container {
    margin-left: 12px;
  }

  .replies-list {
    padding-left: 10px;
  }

  .game-screen-wrapper {
    padding-bottom: 0;
    height: clamp(300px, 58vh, 560px);
    min-height: 300px;
    border-radius: var(--radius-md);
  }

  .game-screen-wrapper:fullscreen,
  .game-screen-wrapper:-webkit-full-screen {
    height: 100vh;
    width: 100vw;
    padding-bottom: 0;
  }

  .game-screen-wrapper:fullscreen .game-iframe,
  .game-screen-wrapper:-webkit-full-screen .game-iframe {
    height: 100%;
  }

  .game-details-card {
    padding: 16px;
  }

  .comment-guest-prompt {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .btn-signin-comment {
    width: 100%;
    justify-content: center;
  }

  .reply-guest-box {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
    text-align: center;
  }

  .auth-modal {
    padding: 22px 18px;
    max-height: 92vh;
    overflow-y: auto;
  }

  .categories-grid-dropdown {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .brand-tag {
    display: none;
  }

  .brand-logo-wrap {
    width: 34px;
    height: 34px;
  }

  .brand-text {
    font-size: 17px;
  }

  .btn-categories span {
    display: none;
  }

  .btn-categories {
    padding: 10px 12px;
  }

  .nav-btn span {
    display: none;
  }

  .nav-btn {
    padding: 10px 12px;
  }

  .user-badge-name {
    display: none;
  }

  .user-badge-btn {
    padding: 6px;
  }

  .game-grid:not(.profile-fav-grid) .game-card-overlay {
    padding: 7px;
  }

  .game-grid:not(.profile-fav-grid) .game-card.large .game-card-overlay,
  .game-grid:not(.profile-fav-grid) .game-card.wide .game-card-overlay {
    padding: 10px;
  }

  .game-grid:not(.profile-fav-grid) .card-badge {
    font-size: 7px;
    padding: 2px 5px;
    border-radius: 6px;
  }

  .game-grid:not(.profile-fav-grid) .game-card.large .card-badge,
  .game-grid:not(.profile-fav-grid) .game-card.wide .card-badge {
    font-size: 8px;
    padding: 3px 6px;
  }

  .game-grid:not(.profile-fav-grid) .game-card.normal .card-title {
    font-size: 9px;
    margin-bottom: 1px;
  }

  .game-grid:not(.profile-fav-grid) .game-card.wide .card-title {
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .game-grid:not(.profile-fav-grid) .game-card.tall .card-title {
    font-size: 10px;
    line-height: 1.15;
    white-space: normal;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .game-grid:not(.profile-fav-grid) .game-card.large .card-title {
    font-size: 13px;
    line-height: 1.2;
    white-space: normal;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .game-grid:not(.profile-fav-grid) .game-card.normal .card-meta {
    font-size: 8px;
    gap: 3px;
  }

  .game-grid:not(.profile-fav-grid) .game-card.normal .card-meta span:nth-child(2),
  .game-grid:not(.profile-fav-grid) .game-card.normal .card-meta span:last-child {
    display: none;
  }

  .game-grid:not(.profile-fav-grid) .game-card.wide .card-meta,
  .game-grid:not(.profile-fav-grid) .game-card.tall .card-meta,
  .game-grid:not(.profile-fav-grid) .game-card.large .card-meta {
    font-size: 9px;
    gap: 4px;
  }

  .game-grid:not(.profile-fav-grid) .game-card.normal .card-play-btn {
    width: 28px;
    height: 28px;
    font-size: 11px;
    opacity: 0.75;
    transform: translate(-50%, -50%) scale(1);
  }

  .game-grid:not(.profile-fav-grid) .game-card.wide .card-play-btn,
  .game-grid:not(.profile-fav-grid) .game-card.tall .card-play-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }

  .game-grid:not(.profile-fav-grid) .game-card.large .card-play-btn {
    width: 44px;
    height: 44px;
    font-size: 16px;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  .game-grid:not(.profile-fav-grid) .game-card {
    border-radius: var(--radius-md);
  }

  .game-grid:not(.profile-fav-grid) .game-card.large {
    border-radius: var(--radius-lg);
    box-shadow: 0 6px 18px rgba(0, 240, 255, 0.12);
  }

  .search-input {
    font-size: 14px;
    padding: 8px 12px 8px 34px;
    border-radius: var(--radius-md);
  }

  .search-icon {
    left: 11px;
    font-size: 13px;
  }

  .search-wrapper {
    flex: 1 1 0;
    min-width: 0;
  }

  .btn-categories .fa-chevron-down {
    display: none;
  }
}

@media (max-width: 380px) {
  .game-grid:not(.profile-fav-grid) {
    grid-auto-rows: 80px;
    gap: 6px;
  }

  .game-grid:not(.profile-fav-grid) .game-card.large .card-title {
    font-size: 12px;
  }

  .game-grid:not(.profile-fav-grid) .game-card.wide .card-title {
    font-size: 10px;
  }

}

/* Touch devices: use click menus instead of hover-only */
@media (hover: none) and (pointer: coarse) {
  .categories-nav-wrapper:hover .categories-mega-menu:not(.show) {
    opacity: 0;
    visibility: hidden;
  }

  .user-menu-wrapper:hover .user-dropdown-menu:not(.show) {
    display: none;
  }
}

/* ========== PROFILE PAGE ========== */
.profile-page {
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 48px;
}

.profile-hero {
  position: relative;
  margin: 24px 0 32px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08) 0%, rgba(168, 85, 247, 0.12) 50%, rgba(236, 72, 153, 0.08) 100%);
}

.profile-hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 0%, rgba(0, 240, 255, 0.15), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(168, 85, 247, 0.2), transparent 55%);
  pointer-events: none;
}

.profile-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 32px 28px;
}

.profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.profile-avatar-ring {
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #a855f7, #ec4899);
}

.profile-avatar-editable {
  position: relative;
}

.profile-avatar-change {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(10, 14, 23, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
  text-align: center;
  padding: 8px;
}

.profile-avatar-editable:hover .profile-avatar-change,
.profile-avatar-editable:focus-within .profile-avatar-change {
  opacity: 1;
}

.profile-avatar-change i {
  font-size: 18px;
  color: var(--primary);
}

.profile-avatar-hint {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  max-width: 140px;
  line-height: 1.35;
}

@media (hover: none) and (pointer: coarse) {
  .profile-avatar-change {
    opacity: 1;
    background: rgba(10, 14, 23, 0.35);
  }

  .profile-avatar-change span {
    display: none;
  }
}

.profile-avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg-surface);
  display: block;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fbbf24;
  margin-bottom: 8px;
}

.profile-hero-text h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  margin: 0 0 8px;
  background: linear-gradient(90deg, var(--text-main), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-email,
.profile-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin: 4px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.profile-meta .dot {
  opacity: 0.5;
}

.profile-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 320px;
  width: 100%;
}

.profile-points-card {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(10, 14, 23, 0.55);
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 8px 28px rgba(251, 191, 36, 0.12);
}

[data-theme="light"] .profile-points-card {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(245, 158, 11, 0.45);
}

.profile-future-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  color: #fde68a;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.35), rgba(249, 115, 22, 0.35));
  border: 1px solid rgba(251, 191, 36, 0.4);
}

.profile-points-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.profile-points-icon {
  font-size: 32px;
  color: #fbbf24;
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.45));
}

.profile-points-value {
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(90deg, #fbbf24, #f59e0b, #fde68a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-points-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.profile-points-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.profile-points-note strong {
  color: var(--text-main);
}

.profile-points-earn {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.profile-points-earn li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-points-earn i {
  width: 16px;
  color: var(--primary);
  font-size: 11px;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.profile-btn-ghost {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-main);
}

.profile-btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.profile-btn-danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #f87171;
}

.profile-btn-danger:hover {
  background: rgba(248, 113, 113, 0.22);
}

.profile-btn-block {
  width: 100%;
  margin-top: 16px;
}

.profile-demographics-card {
  margin: 0 0 24px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.profile-demographics-card h2 {
  font-size: 1.1rem;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-demographics-note {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.5;
}

.profile-demographics-saved {
  color: #10b981;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 12px;
}

.profile-demographics-form {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.profile-demo-field {
  flex: 1 1 160px;
  min-width: 140px;
}

.profile-demo-field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

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

.profile-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: transform 0.2s, border-color 0.2s;
}

.profile-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 240, 255, 0.35);
}

.profile-stat-card.highlight {
  grid-column: span 1;
  background: linear-gradient(145deg, rgba(0, 240, 255, 0.06), var(--bg-surface));
  border-color: rgba(0, 240, 255, 0.25);
}

.profile-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.profile-stat-card h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
}

.profile-stat-card span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.profile-stat-card small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 2px;
}

.profile-stat-card .stat-live-hint {
  font-size: 10px;
  opacity: 0.65;
  font-style: italic;
}

.profile-section {
  margin-bottom: 40px;
}

.profile-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.profile-count-pill {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(236, 72, 153, 0.12);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.25);
}

.profile-empty-card {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
}

.profile-empty-card i {
  font-size: 48px;
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 16px;
}

.profile-fav-grid {
  margin-top: 8px;
}

.profile-account-card {
  padding: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.profile-account-card h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.profile-account-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  gap: 12px;
}

.profile-account-list li span {
  color: var(--text-muted);
}

.profile-account-list li b {
  text-align: right;
  word-break: break-all;
}

@media (max-width: 768px) {
  .profile-hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 24px 20px;
  }

  .profile-avatar-ring {
    margin: 0 auto;
  }

  .profile-email,
  .profile-meta {
    justify-content: center;
  }

  .profile-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .profile-btn {
    flex: 1 1 140px;
  }

  .profile-stat-card.highlight {
    grid-column: span 1;
  }
}

