/* ==================== Reset & Variables ==================== */
:root {
  --bg-primary: #1a1a2e;
  --bg-secondary: #16213e;
  --bg-card: #0f3460;
  --bg-hover: #1a4080;
  --text-primary: #eaeaea;
  --text-secondary: #a0a0b0;
  --accent: #00d4ff;
  --accent-hover: #00b8e0;
  --cta: #ff6b35;
  --cta-hover: #e55a2b;
  --discount: #e94560;
  --success: #2ecc71;
  --warning: #f39c12;
  --border: #2a2a4a;
  --shadow: 0 4px 20px rgba(0,0,0,0.3);
  --radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; }

button { cursor: pointer; border: none; outline: none; font-family: inherit; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }

/* ==================== Header ==================== */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  flex-wrap: wrap;
  gap: 12px;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.logo span { color: var(--cta); }

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

.search-box {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 10px 40px 10px 16px;
  border: 1px solid var(--border);
  border-radius: 25px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

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

.search-box .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1rem;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  margin-top: 4px;
}

.search-results.active { display: block; }

.search-result-item {
  padding: 10px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.search-result-item:hover { background: var(--bg-hover); }

.search-result-item .sr-name { font-size: 0.9rem; }
.search-result-item .sr-cat { font-size: 0.75rem; color: var(--text-secondary); }

/* Language Switch */
.lang-switch {
  position: relative;
}

.lang-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

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

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 140px;
  z-index: 100;
  display: none;
  margin-top: 4px;
  box-shadow: var(--shadow);
}

.lang-dropdown.active { display: block; }

.lang-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: var(--transition);
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
  background: var(--bg-hover);
  color: var(--accent);
}

/* Login Button */
.login-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

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

/* User Menu */
.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  color: var(--accent);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--accent);
  transition: var(--transition);
}

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

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 150px;
  z-index: 100;
  display: none;
  margin-top: 4px;
  box-shadow: var(--shadow);
}

.user-dropdown.active { display: block; }

.user-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: var(--transition);
}

.user-dropdown a:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

#user-logout { color: var(--discount); }
#user-logout:hover { color: var(--discount); background: rgba(233,69,96,0.1); }

/* Cart Button */
.cart-btn {
  background: var(--cta);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  transition: var(--transition);
}

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

.cart-count {
  background: #fff;
  color: var(--cta);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

/* ==================== Navigation ==================== */
.nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav::-webkit-scrollbar { height: 0; }

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
  min-width: max-content;
}

.nav-list li a {
  display: block;
  padding: 14px 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition);
  border-bottom: 2px solid transparent;
}

.nav-list li a:hover,
.nav-list li a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ==================== Banner ==================== */
.banner {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  padding: 60px 0;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}

.banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0,212,255,0.1), transparent);
  border-radius: 50%;
}

.banner-content { position: relative; z-index: 1; }

.banner h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, var(--accent), var(--cta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.banner p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 500px;
}

.banner .btn-primary {
  display: inline-block;
  background: var(--cta);
  color: #fff;
  padding: 12px 32px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
}

.banner .btn-primary:hover {
  background: var(--cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,107,53,0.3);
}

/* ==================== Section ==================== */
.section {
  margin-bottom: 50px;
}

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

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h2 .icon {
  color: var(--accent);
  font-size: 1.3rem;
}

.section-header .view-all {
  font-size: 0.85rem;
  color: var(--accent);
  transition: var(--transition);
}

.section-header .view-all:hover { color: var(--accent-hover); }

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

.game-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,212,255,0.1);
  border-color: var(--accent);
}

.game-card-img {
  height: 120px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--accent);
  position: relative;
  overflow: hidden;
}

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

.game-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-card), transparent);
}

.game-card-body {
  padding: 14px;
}

.game-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.game-card-region {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.game-card-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}

.game-card-original {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: line-through;
  margin-left: 6px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-hot {
  background: var(--cta);
  color: #fff;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.badge-new {
  background: var(--success);
  color: #fff;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.badge-discount {
  background: var(--discount);
  color: #fff;
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

/* Scrolling row */
.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
}

.scroll-row::-webkit-scrollbar { height: 4px; }
.scroll-row::-webkit-scrollbar-track { background: var(--border); border-radius: 4px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

.scroll-row .game-card {
  min-width: 220px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* ==================== Category Icons Row ==================== */
.cat-icons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.cat-icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
  min-width: 100px;
}

.cat-icon-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,212,255,0.1);
}

.cat-icon-item .cat-icon {
  font-size: 1.8rem;
  color: var(--accent);
}

.cat-icon-item .cat-name {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

/* ==================== Game Detail ==================== */
.game-detail {
  display: none;
  padding: 40px 0;
}

.game-detail.active { display: block; }

.game-detail-header {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.game-detail-icon {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-card));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

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

.game-detail-info h2 { font-size: 1.6rem; margin-bottom: 6px; }
.game-detail-info .region-tag { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px; }
.game-detail-info .desc { color: var(--text-secondary); font-size: 0.9rem; max-width: 600px; }

.game-detail .back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  transition: var(--transition);
}

.game-detail .back-btn:hover { color: var(--accent); }

.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.product-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.product-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 15px rgba(0,212,255,0.1);
}

.product-item.selected {
  border-color: var(--accent);
  background: rgba(0,212,255,0.05);
}

.product-denom {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent);
}

.product-original {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.product-discount {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--discount);
  color: #fff;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
}

.buy-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: var(--cta);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

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

/* ==================== Cart Sidebar ==================== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  display: none;
}

.cart-overlay.active { display: block; }

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-secondary);
  z-index: 2001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 20px rgba(0,0,0,0.5);
}

.cart-sidebar.active { right: 0; }

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

.cart-header h3 { font-size: 1.1rem; }

.cart-close {
  background: none;
  color: var(--text-secondary);
  font-size: 1.3rem;
  padding: 4px 8px;
}

.cart-close:hover { color: var(--text-primary); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-info { flex: 1; }
.cart-item-name { font-size: 0.9rem; font-weight: 500; }
.cart-item-price { font-size: 0.85rem; color: var(--accent); margin-top: 2px; }

.cart-item-remove {
  background: none;
  color: var(--discount);
  font-size: 1.1rem;
  padding: 4px;
}

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.cart-total .amount { color: var(--accent); }

.checkout-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--cta);
  color: #fff;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
}

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

/* ==================== Footer ==================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--accent);
}

.footer-col p, .footer-col a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.8;
  display: block;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  text-align: center;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ==================== Auth Pages (Login / Register) ==================== */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 200px);
  padding: 40px 20px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.auth-tabs {
  display: flex;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 12px;
  background: none;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-tab:hover { color: var(--text-primary); }

.auth-form {
  display: none;
}

.auth-form.active { display: block; }

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

.auth-form .form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-form .form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.auth-form .form-group input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.auth-error {
  color: var(--discount);
  font-size: 0.85rem;
  margin-bottom: 12px;
  min-height: 20px;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.auth-footer a {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.auth-footer a:hover { color: var(--accent); }

/* ==================== Admin ==================== */
.admin-login {
  max-width: 400px;
  margin: 80px auto;
  padding: 30px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.admin-login h2 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--accent);
}

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

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9rem;
}

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

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
}

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

.btn-danger { background: var(--discount); color: #fff; }
.btn-danger:hover { opacity: 0.9; }

.btn-cta { background: var(--cta); color: #fff; }
.btn-cta:hover { background: var(--cta-hover); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

.btn-block { display: block; width: 100%; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
}

.admin-header h2 { color: var(--accent); }

.admin-content { padding: 0 20px 40px; }

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

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-card .stat-label { font-size: 0.85rem; color: var(--text-secondary); margin-top: 4px; }

.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.admin-tab {
  padding: 12px 24px;
  background: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}

.admin-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.admin-tab:hover { color: var(--text-primary); }

.admin-table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
}

.admin-table tr:hover td { background: rgba(0,212,255,0.03); }

.admin-table input {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  width: 100%;
  max-width: 150px;
}

.admin-table select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
}

.batch-price-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.batch-price-panel h3 { margin-bottom: 16px; color: var(--accent); }

.batch-price-form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.batch-price-form .form-group { margin-bottom: 0; }

.preview-table {
  margin-top: 20px;
}

.preview-table .price-old { text-decoration: line-through; color: var(--text-secondary); }
.preview-table .price-new { color: var(--success); font-weight: 600; }

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--success);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  z-index: 3000;
  animation: slideIn 0.3s ease;
  box-shadow: var(--shadow);
}

.toast.error { background: var(--discount); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==================== Loading ==================== */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .header-top { flex-direction: column; align-items: stretch; }
  .search-box { max-width: 100%; }
  .header-actions { justify-content: center; }
  .banner h1 { font-size: 1.8rem; }
  .game-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .game-detail-header { flex-direction: column; align-items: center; text-align: center; }
  .cart-sidebar { width: 100%; max-width: 100%; }
  .cat-icons { gap: 10px; }
  .cat-icon-item { padding: 12px 16px; min-width: 80px; }
  .auth-container { padding: 20px; }
}

/* ==================== RTL (Arabic) Support ==================== */
[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .header-top {
  flex-direction: row-reverse;
}

[dir="rtl"] .game-detail-header,
[dir="rtl"] .search-box,
[dir="rtl"] .header-actions {
  direction: rtl;
}

[dir="rtl"] .cart-sidebar {
  left: 0;
  right: auto;
  transform: translateX(-100%);
}

[dir="rtl"] .cart-sidebar.active {
  transform: translateX(0);
}

[dir="rtl"] .back-btn::before {
  content: none;
}

[dir="rtl"] .back-btn::after {
  content: ' \2192';
}

/* ==================== Payment Modal ==================== */
.payment-modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}
.payment-modal-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
}
.payment-modal-content {
  position: relative;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--border);
  z-index: 1;
}
.payment-modal-content h2 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}
.payment-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.payment-method {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
}
.payment-method:hover {
  border-color: var(--accent);
  background: rgba(0, 168, 255, 0.1);
}
.payment-icon {
  font-size: 1.2rem;
}

/* ==================== Payment Badge ==================== */
.payment-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

/* ==================== Orders Page ==================== */
.orders-page {
  min-height: 70vh;
  padding: 40px 0;
}
.orders-page h1 {
  font-size: 1.5rem;
  margin-bottom: 24px;
}
.orders-table-wrapper {
  overflow-x: auto;
}
.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.orders-table th {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 2px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}
.orders-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.orders-table tr:hover {
  background: rgba(255,255,255,0.03);
}
.orders-confirm-btn {
  font-size: 0.8rem;
  padding: 4px 10px;
}

/* ==================== Admin Orders Table ==================== */
.admin-table .payment-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .payment-methods {
    grid-template-columns: 1fr;
  }
  .orders-table th,
  .orders-table td {
    padding: 8px 6px;
    font-size: 0.8rem;
  }
}

/* ==================== Admin Language Switcher ==================== */
.admin-header .lang-switch {
  position: relative;
}
.admin-header .lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.admin-header .lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 1000;
  min-width: 130px;
  max-height: 280px;
  overflow-y: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.admin-header .lang-dropdown a {
  display: block;
  padding: 8px 14px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s;
}
.admin-header .lang-dropdown a:hover {
  background: rgba(0,168,255,0.1);
}
.admin-header .lang-dropdown a.active {
  color: var(--accent);
  font-weight: 600;
}
