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

:root {
  --bg-primary: #0D1117;
  --bg-secondary: #161B22;
  --bg-card: #1C2128;
  --border-color: #30363D;
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --accent: #00D4FF;
  --accent-hover: #00B8E0;
  --btn-secondary: #21262D;
  --btn-secondary-hover: #30363D;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.logo-text h1 {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.logo-text p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.2;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--btn-secondary-hover);
  color: var(--text-primary);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 14px;
  color: var(--text-primary);
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #0099CC);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}

.btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-secondary {
  background: var(--btn-secondary);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--btn-secondary-hover);
}

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
  font-weight: 600;
}

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

.plus {
  font-size: 16px;
  line-height: 1;
}

/* Main */
.main {
  padding: 24px 32px 48px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.title-accent {
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

/* Search Bar */
.search-bar {
  position: relative;
  margin-bottom: 20px;
}

.search-bar input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.search-bar input::placeholder {
  color: var(--text-secondary);
}

.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  pointer-events: none;
}

/* Game Grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  border-color: var(--border-color);
}

.game-cover {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1d22;
}

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

.game-info {
  padding: 14px;
}

.game-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.game-info p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Decorative game art */
.year-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: #E53935;
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
}

/* Dice */
.dice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 70%;
  height: 70%;
}

.dice {
  background: white;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.dice-1 { background: #FF5252; }
.dice-2 { background: #42A5F5; }
.dice-3 { background: #66BB6A; }
.dice-4 { background: #FFCA28; }

.dice span {
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
}

.dice-1 span:nth-child(1) { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 16px; height: 16px; }

.dice-2 span:nth-child(1) { top: 20%; left: 20%; }
.dice-2 span:nth-child(2) { bottom: 20%; right: 20%; }
.dice-2 span:nth-child(3) { display: none; }

.dice-3 span:nth-child(1) { top: 18%; left: 18%; }
.dice-3 span:nth-child(2) { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.dice-3 span:nth-child(3) { bottom: 18%; right: 18%; }
.dice-3 span:nth-child(4),
.dice-3 span:nth-child(5) { display: none; }

.dice-4 span:nth-child(1) { top: 18%; left: 18%; }
.dice-4 span:nth-child(2) { top: 18%; right: 18%; }
.dice-4 span:nth-child(3) { bottom: 18%; left: 18%; }
.dice-4 span:nth-child(4) { bottom: 18%; right: 18%; }
.dice-4 span:nth-child(5) { display: none; }

/* Gourd */
.gourd {
  position: relative;
  width: 80px;
  height: 110px;
}

.gourd-body {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 90px;
  background: linear-gradient(135deg, #D4A574 0%, #8B6914 100%);
  border-radius: 50% 50% 45% 45%;
  box-shadow: inset -8px 0 16px rgba(0,0,0,0.2);
}

.gourd-body::before {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, #D4A574 0%, #8B6914 100%);
  border-radius: 50%;
}

.gourd-ribbon {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border: 4px solid #9C27B0;
  border-radius: 50%;
  border-bottom-color: transparent;
  border-left-color: transparent;
}

/* Nezha */
.nezha {
  position: relative;
  width: 90px;
  height: 100px;
}

.nezha-face {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 80px;
  background: #FFCCBC;
  border-radius: 50% 50% 45% 45%;
  box-shadow: inset -4px 0 8px rgba(0,0,0,0.1);
}

.nezha-face::before,
.nezha-face::after {
  content: '';
  position: absolute;
  top: 28px;
  width: 10px;
  height: 12px;
  background: #333;
  border-radius: 50%;
}

.nezha-face::before { left: 18px; }
.nezha-face::after { right: 18px; }

.nezha-hair {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 40px;
  background: #333;
  border-radius: 50% 50% 0 0;
}

.nezha-hair::before,
.nezha-hair::after {
  content: '';
  position: absolute;
  top: 25px;
  width: 20px;
  height: 30px;
  background: #333;
  border-radius: 50%;
}

.nezha-hair::before { left: -5px; }
.nezha-hair::after { right: -5px; }

.ribbon {
  position: absolute;
  top: 30px;
  width: 30px;
  height: 40px;
  background: #E53935;
  border-radius: 4px;
}

.ribbon-left { left: -10px; transform: rotate(-30deg); }
.ribbon-right { right: -10px; transform: rotate(30deg); }

/* Truck */
.truck {
  position: relative;
  width: 100px;
  height: 70px;
}

.truck-body {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 70px;
  height: 40px;
  background: #5D4037;
  border-radius: 4px;
  border: 2px solid #8D6E63;
}

.truck-cab {
  position: absolute;
  bottom: 10px;
  right: 0;
  width: 35px;
  height: 35px;
  background: #4E342E;
  border-radius: 4px 8px 4px 4px;
}

.truck-cab::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  width: 20px;
  height: 12px;
  background: #FFD54F;
  border-radius: 2px;
  opacity: 0.6;
}

.truck-light {
  position: absolute;
  bottom: 14px;
  right: -4px;
  width: 8px;
  height: 12px;
  background: #FFEB3B;
  border-radius: 2px;
  box-shadow: 0 0 10px #FFEB3B;
}

.truck-light::before {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 8px;
  height: 12px;
  background: #FFEB3B;
  border-radius: 2px;
  box-shadow: 0 0 10px #FFEB3B;
}

/* School scene */
.school-scene {
  position: relative;
  width: 90px;
  height: 90px;
}

.school-building {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 50px;
  background: #FF7043;
  border-radius: 4px;
}

.school-building::before {
  content: '';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 35px solid transparent;
  border-right: 35px solid transparent;
  border-bottom: 20px solid #D84315;
}

.school-trophy,
.school-cap,
.school-book {
  position: absolute;
  font-size: 22px;
}

.school-trophy { top: 0; left: 0; }
.school-cap { top: 5px; right: 5px; }
.school-book { bottom: 10px; left: 5px; }

/* Magnifier */
.magnifier {
  position: relative;
  width: 80px;
  height: 90px;
}

.magnifier-lens {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  border: 6px solid #D4A574;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.magnifier-handle {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) rotate(-45deg);
  width: 10px;
  height: 45px;
  background: linear-gradient(90deg, #8B6914, #D4A574);
  border-radius: 5px;
  transform-origin: top center;
}

.coin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  background: #FFD54F;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #B8860B;
}

/* Forest house */
.forest-house {
  position: relative;
  width: 90px;
  height: 90px;
}

.house {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 55px;
  height: 40px;
  background: #5D4037;
  border-radius: 2px;
}

.house::before {
  content: '';
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 32px solid transparent;
  border-right: 32px solid transparent;
  border-bottom: 25px solid #3E2723;
}

.house::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 18px;
  background: #FFD54F;
  border-radius: 2px;
  opacity: 0.7;
}

.tree {
  position: absolute;
  bottom: 0;
  left: 5px;
  width: 8px;
  height: 30px;
  background: #4E342E;
}

.tree::before {
  content: '';
  position: absolute;
  top: -25px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 18px solid transparent;
  border-right: 18px solid transparent;
  border-bottom: 35px solid #2E7D32;
}

.glow {
  position: absolute;
  bottom: 5px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(0, 212, 255, 0.3);
  border-radius: 50%;
  filter: blur(8px);
}

/* Jade stone */
.jade-stone {
  position: relative;
  width: 80px;
  height: 80px;
}

.stone {
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 30%, #69F0AE, #00C853, #1B5E20);
  border-radius: 30% 70% 60% 40% / 50% 40% 60% 50%;
  box-shadow: inset -5px -5px 15px rgba(0,0,0,0.3);
}

.vein {
  position: absolute;
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
}

.vein-1 {
  top: 20px;
  left: 15px;
  width: 30px;
  height: 4px;
  transform: rotate(25deg);
}

.vein-2 {
  bottom: 25px;
  right: 20px;
  width: 20px;
  height: 3px;
  transform: rotate(-15deg);
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    padding: 12px 16px;
  }
  
  .header-right {
    gap: 8px;
  }
  
  .user-info span,
  .btn-secondary {
    display: none;
  }
  
  .main {
    padding: 16px;
  }
  
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Upload Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 编辑游戏弹窗需要在个人中心之上 */
#editGameModal.modal-overlay {
  z-index: 1100;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: 24px 24px 0;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-header p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.upload-form {
  padding: 20px 24px 24px;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  resize: vertical;
}

.form-group input[type="text"]::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-hint {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.char-count {
  color: var(--text-secondary);
}

.field-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.5;
}

.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 16px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.upload-area:hover {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.05);
}

.upload-area.has-file {
  border-color: var(--accent);
  background: rgba(0, 212, 255, 0.08);
}

.upload-title {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
}

.upload-input-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px;
}

.upload-input-wrapper input[type="file"] {
  max-width: 180px;
  font-size: 13px;
  color: var(--text-primary);
  background: transparent;
}

.upload-input-wrapper input[type="file"]::-webkit-file-upload-button {
  padding: 5px 12px;
  margin-right: 10px;
  background: var(--btn-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
}

.file-status {
  font-size: 13px;
  color: var(--text-secondary);
}

.file-status.selected {
  color: var(--accent);
}

.edit-preview {
  margin-bottom: 10px;
}

.edit-preview img {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  object-fit: contain;
  background: var(--bg-card);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.modal-actions .btn {
  flex: 1;
  justify-content: center;
  padding: 12px 20px;
  font-size: 15px;
}

.btn-cancel {
  background: var(--btn-secondary);
}

.btn-submit {
  font-weight: 700;
}

@media (max-width: 600px) {
  .modal {
    max-height: 95vh;
  }
  
  .modal-header,
  .upload-form {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .upload-input-wrapper {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  
  .upload-input-wrapper input[type="file"] {
    max-width: 100%;
  }
}

/* Notification Dropdown */
.notification-wrapper {
  position: relative;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 200;
}

.notification-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 14px;
  width: 12px;
  height: 12px;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  border-top: 1px solid var(--border-color);
  transform: rotate(45deg);
}

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

.notification-header h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.mark-read-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.mark-read-btn:hover {
  background: rgba(0, 212, 255, 0.1);
}

.notification-list {
  padding: 24px 16px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notification-empty {
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 768px) {
  .notification-dropdown {
    width: 280px;
    right: -10px;
  }
}

/* Login Modal */
.modal-login {
  max-width: 420px;
}

.modal-login input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}

.modal-login input[type="password"]::placeholder {
  color: var(--text-secondary);
}

.modal-login input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.captcha-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.captcha-row input {
  flex: 1;
}

.captcha-image {
  width: 110px;
  height: 44px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--border-color);
  object-fit: cover;
  background: var(--bg-card);
}

#refreshCaptcha {
  padding: 0 14px;
  font-size: 13px;
  white-space: nowrap;
}

.form-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

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

.form-footer a:hover {
  text-decoration: underline;
}

.form-footer span {
  margin: 0 6px;
}

/* Hidden state helpers */
.hidden {
  display: none !important;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 32px;
  padding: 16px 0;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(.active):not(.disabled) {
  background: var(--btn-secondary-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
}

.page-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.page-info {
  font-size: 14px;
  color: var(--text-secondary);
  margin-left: 12px;
}

@media (max-width: 768px) {
  .pagination {
    gap: 6px;
  }

  .page-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    font-size: 13px;
  }

  .page-info {
    width: 100%;
    text-align: center;
    margin-left: 0;
    margin-top: 8px;
  }
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-secondary);
  font-size: 16px;
  border: 2px dashed var(--border-color);
  border-radius: 16px;
}

/* ===== Admin page ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
}

.filter-tabs .tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-tabs .tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-tabs .tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
}

.admin-stats {
  display: flex;
  gap: 16px;
  margin: 16px 0 24px;
  flex-wrap: wrap;
}

.admin-stats .stat {
  padding: 8px 16px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-secondary);
}

.admin-stats .stat b {
  color: var(--text-primary);
  font-size: 16px;
  margin-left: 4px;
}

.game-info .contact {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0 10px;
  word-break: break-all;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  background: rgba(255, 167, 38, 0.15);
  color: #FFA726;
}

.status-approved {
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
}

.status-rejected {
  background: rgba(244, 67, 54, 0.15);
  color: #F44336;
}

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

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-warning {
  background: rgba(255, 167, 38, 0.15);
  color: #FFA726;
  border: 1px solid rgba(255, 167, 38, 0.4);
}

.btn-warning:hover {
  background: rgba(255, 167, 38, 0.25);
}

.btn-danger {
  background: rgba(244, 67, 54, 0.12);
  color: #F44336;
  border: 1px solid rgba(244, 67, 54, 0.35);
}

.btn-danger:hover {
  background: rgba(244, 67, 54, 0.22);
}

/* ===== Game Detail Overlay ===== */
.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow: hidden;
}

.detail-overlay.active {
  opacity: 1;
  visibility: visible;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5);
}

.detail-back {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
}

.detail-back:hover {
  background: rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.35);
}

.detail-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 100px 24px 180px;
}

.detail-icon {
  width: 132px;
  height: 132px;
  border-radius: 26px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.25);
}

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

.detail-content h2 {
  font-size: 38px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.detail-content p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  line-height: 1.7;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.detail-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 40px 36px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.4) 60%, transparent);
}

.detail-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.9;
}

.detail-meta span {
  color: #fff;
}

.detail-qr {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
}

.detail-qr img {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
  display: block;
  margin: 0 auto 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 768px) {
  .detail-content h2 {
    font-size: 28px;
  }

  .detail-icon {
    width: 100px;
    height: 100px;
  }

  .detail-footer {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px 28px;
  }

  .detail-qr {
    align-self: flex-end;
  }

  .detail-qr img {
    width: 96px;
    height: 96px;
  }
}

/* ===== Profile Modal ===== */
.profile-modal {
  max-width: 480px;
}

.profile-body {
  padding: 20px 24px 24px;
}

.profile-user {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #0099CC);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border-color);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-email {
  font-size: 14px;
  color: var(--text-secondary);
}

.profile-actions {
  margin-bottom: 24px;
}

.profile-actions .btn {
  min-width: 100px;
}

.profile-share {
  margin-bottom: 24px;
}

.profile-share label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.share-row {
  display: flex;
  gap: 10px;
}

.share-row input {
  flex: 1;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.share-row .btn {
  flex-shrink: 0;
}

.profile-games h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.profile-game-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-game-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

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

.profile-game-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1d22;
  flex-shrink: 0;
}

.profile-game-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-game-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

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

.profile-game-status {
  font-size: 12px;
  font-weight: 600;
}

.profile-game-status.pending {
  color: #FFA726;
}

.profile-game-status.approved {
  color: #4CAF50;
}

.profile-game-status.rejected {
  color: #F44336;
}

.profile-game-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.profile-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: 10px;
}

.profile-footer {
  margin-top: 24px;
}

.profile-close {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 700;
}

@media (max-width: 600px) {
  .profile-user {
    gap: 12px;
  }

  .profile-avatar {
    width: 60px;
    height: 60px;
    font-size: 22px;
  }

  .share-row {
    flex-direction: column;
  }

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

  .profile-game-actions {
    display: none;
  }
}
