@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');
:root {
  --bg-primary:    #0a0a0f;
  --bg-secondary:  #12121a;
  --bg-card:       #1a1a28;
  --bg-elevated:   #22223a;
  --border:        #2e2e4a;
  --border-light:  #3e3e60;

  --neon-cyan:     #00e5ff;
  --neon-purple:   #9c4dcc;
  --neon-pink:     #e040fb;
  --neon-green:    #00e676;
  --accent:        #00e5ff;


  --text-primary:  #f0f0ff;
  --text-secondary:#9090b8;
  --text-muted:    #5a5a80;

  --danger:        #ff4444;
  --success:       #00e676;
  --warning:       #ffab40;

  --shadow-glow:   0 0 20px rgba(0, 229, 255, 0.15);
  --shadow-card:   0 4px 24px rgba(0, 0, 0, 0.5);
  --radius:        8px;
  --radius-lg:     14px;
  --transition:    0.2s ease;

  --nav-height:    64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Rajdhani', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3, h4 {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

a { color: var(--neon-cyan); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--neon-pink); }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.hidden { display: none !important; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--neon-cyan);
  text-shadow: 0 0 20px rgba(0,229,255,0.5);
  letter-spacing: 0.1em;
}

.nav-logo span { color: var(--neon-pink); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--neon-cyan);
  background: rgba(0, 229, 255, 0.08);
}

.cart-badge {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--neon-pink);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}

.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), #007acc);
  color: #000;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.3);
}

.btn-primary:hover { box-shadow: 0 0 28px rgba(0, 229, 255, 0.5); }

.btn-secondary {
  background: transparent;
  color: var(--neon-cyan);
  border: 1px solid var(--neon-cyan);
}

.btn-secondary:hover {
  background: rgba(0, 229, 255, 0.08);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover { background: rgba(255, 68, 68, 0.1); }

.btn-success {
  background: linear-gradient(135deg, var(--neon-green), #00a050);
  color: #000;
}

.btn-sm { 
  padding: 6px 14px; 
  font-size: 0.8rem; 
}
.btn-lg { padding: 14px 32px; 
  font-size: 1.05rem
}
.btn-block { 
  width: 100%; 
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  box-shadow: var(--shadow-glow), var(--shadow-card);
  transform: translateY(-2px);
}
.game-card {
  display: flex;
  flex-direction: column;
}
.game-card-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: var(--bg-elevated);
}

.game-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
}
.game-card-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-card-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-genre { background: rgba(156,77,204,0.2); color: var(--neon-purple); border: 1px solid rgba(156,77,204,0.3); }
.badge-platform { background: rgba(0,229,255,0.1); color: var(--neon-cyan); border: 1px solid rgba(0,229,255,0.2); }
.game-card-price {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-cyan);
  margin-top: auto;
}
.game-card-stock {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.game-card-stock.low { color: var(--warning); }
.game-card-stock.out { color: var(--danger); }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
input, select, textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  padding: 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.1);
}
.password-group {
  position: relative;
  display: flex;
  align-items: center;
}
.password-group input {
  flex: 1;
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}
.password-toggle:hover .eye-icon.visible {
  stroke: var(--neon-cyan);
  color: var(--neon-cyan);
}
.eye-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: opacity var(--transition), stroke var(--transition);
  stroke: var(--text-secondary);
  color: var(--text-secondary);
}
.eye-icon.visible {
  opacity: 1
}
/* used psuedocode */
input::placeholder, textarea::placeholder { color: var(--text-muted); }
textarea { resize: vertical; min-height: 90px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.auth-page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
}
.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card);
}
.auth-box h1 {
  font-size: 1.4rem;
  margin-bottom: 6px;
  color: var(--neon-cyan);
}
.auth-box p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 0.9rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.page-header {
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-header h1 {
  font-size: 1.6rem;
  color: var(--text-primary);
}

.page-header h1 span { 
  color: var(--neon-cyan); 
}
.search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.search-bar input {
  flex: 1;
  min-width: 200px;
}
.search-bar select {
  width: auto;
  min-width: 150px;
}
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  transition: border-color var(--transition);
}
.cart-item:hover { 
  border-color: rgba(0,229,255,0.2); 
}
.cart-item-img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  flex-shrink: 0;
}
.cart-item-info { 
  flex: 1; min-width: 0; 
}
.cart-item-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}
.cart-item-price {
  color: var(--neon-cyan);
  font-weight: 600;
  font-size: 0.9rem;
}
.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: all var(--transition);
}

.qty-btn:hover {
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
}

.qty-value {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  min-width: 24px;
  text-align: center;
}

.cart-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-height) + 16px);
}

.cart-summary h3 {
  font-size: 1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  letter-spacing: 0.1em;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 1px solid var(--border);
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--neon-cyan);
}
/* orders screen */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  transition: border-color var(--transition);
}
.order-card:hover { 
  border-color: rgba(0,229,255,0.2); 
}
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.order-id {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.order-total {
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--neon-cyan);
}

.order-date {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.status-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-PENDING    { 
  background: rgba(255,171,64,0.15); 
  color: var(--warning); 
  border: 1px solid rgba(255,171,64,0.3); 

}
.status-PROCESSING { 
  background: rgba(0,229,255,0.1);   
  color: var(--neon-cyan); 
  border: 1px solid rgba(0,229,255,0.2); 
}
.status-SHIPPED    { 
  background: rgba(156,77,204,0.15); 
  color: var(--neon-purple); 
  border: 1px solid rgba(156,77,204,0.3); 
}

.status-DELIVERED 
 { 
  background: rgba(0,230,118,0.12); 
  color: var(--neon-green); 
  border: 1px solid rgba(0,230,118,0.3); 
}

.status-CANCELLED  { 
  background: rgba(255,68,68,0.1);
   color: var(--danger);
    border: 1px solid rgba(255,68,68,0.2); 
  }

.order-items-list { 
  padding: 16px 20px; 
}

.order-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.order-item-row:last-child { 
  border-bottom: none; 
}
.order-item-img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.order-item-details { flex: 1; min-width: 0; }

.order-item-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-item-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.admin-order-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 220px;
}

.admin-order-items-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-order-item {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
}

.admin-order-item-title {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.admin-order-item-meta {
  margin-top: 2px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
/* admin screen */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
  min-height: calc(100vh - var(--nav-height) - 80px);
}

.admin-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: calc(var(--nav-height) + 16px);
}

.admin-sidebar-header {
  padding: 16px 20px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.admin-nav { list-style: none; padding: 8px; }

.admin-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition);
}

.admin-nav li a:hover,
.admin-nav li a.active {
  background: rgba(0,229,255,0.08);
  color: var(--neon-cyan);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

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

.data-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card), var(--shadow-glow);
  transform: translateY(20px);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal { transform: translateY(0); }

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

.modal-header h2 {
  font-size: 1rem;
  color: var(--neon-cyan);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition);
}

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

.modal-form { display: flex; flex-direction: column; gap: 16px; }
/* for alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid;
}

.alert-error   { background: rgba(255,68,68,0.1);   border-color: rgba(255,68,68,0.3);  color: #ff8888; }
.alert-success { background: rgba(0,230,118,0.1); border-color: rgba(0,230,118,0.3); color: #5affa5; }
.alert-info    { background: rgba(0,229,255,0.08); border-color: rgba(0,229,255,0.2);  color: var(--neon-cyan); }


/* loading */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--neon-cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
  text-align: center;
  padding: 60px 16px;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 80px 16px;
  color: var(--text-muted);
}

.empty-state h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.hero {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 480px;
  margin: 0 auto 32px;
}

.section {
  padding: 40px 0;
}

@media (max-width: 768px) {
  .cart-layout { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .games-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

  .nav-links .nav-text { display: none; }
  .admin-sidebar { position: static; }
}
/* for mobile */
@media (max-width: 480px) {
  .auth-box { padding: 28px 20px; }
  .modal { padding: 24px 16px; }
}
