:root {
  --bg-app: #060606;
  --bg-card: rgba(18, 18, 18, 0.7);
  --bg-card-hover: rgba(28, 28, 28, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.2);
  --text-main: #ffffff;
  --text-muted: #8e8e93;
  --accent-primary: #00bcd4;
  --accent-green: #00ff88;
  --accent-red: #ff4466;
  --font-sans: 'Cairo', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

body {
  background: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  padding: 30px;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Background Glows */
.spatial-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 188, 212, 0.05) 0%, transparent 70%);
  top: -150px;
  right: -50px;
}

.glow-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.02) 0%, transparent 70%);
  bottom: -200px;
  left: -150px;
}

/* Admin Container */
.admin-container {
  max-width: 1280px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Header */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

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

.logo-text {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #ffffff 0%, #8e8e93 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-server {
  font-size: 9px;
  font-weight: 800;
  color: var(--accent-green);
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
}

/* Bento Grid */
.admin-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 24px;
}

/* Cards */
.admin-card {
  background: var(--bg-card);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.admin-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

h3 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #ffffff;
}

/* Search Box */
.search-box {
  margin-bottom: 16px;
}

.search-box input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}

.search-box input:focus {
  border-color: var(--accent-primary);
  background: rgba(0, 0, 0, 0.6);
}

/* Inputs & Form Fields */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

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

label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

input[type="text"], select, textarea {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  outline: none;
  transition: var(--transition-smooth);
}

input[type="text"]:focus, select:focus, textarea:focus {
  border-color: var(--border-active);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 40px;
}

select option {
  background: #121212;
  color: #fff;
}

textarea {
  resize: vertical;
}

/* Games list wrapper */
.products-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.products-list-wrapper::-webkit-scrollbar {
  width: 4px;
}

.products-list-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.product-tab-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
  width: 100%;
}

.product-tab-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

.product-tab-btn.active {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--accent-primary);
  box-shadow: 0 0 15px rgba(0, 188, 212, 0.1);
}

.product-tab-icon {
  width: 32px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}

.product-tab-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  overflow: hidden;
}

.tab-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tab-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Badge status indicators in sidebar */
.badge-status {
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-status.status-new {
  color: var(--accent-primary);
  background: rgba(0, 188, 212, 0.1);
  border: 1px solid rgba(0, 188, 212, 0.2);
}

.badge-status.status-updated {
  color: var(--accent-green);
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.2);
}

.badge-status.status-outdated {
  color: var(--accent-red);
  background: rgba(255, 68, 102, 0.1);
  border: 1px solid rgba(255, 68, 102, 0.2);
}

/* Main Editor Card */
.main-editor-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.editor-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 20px;
}

.editor-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#editor-game-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.banner-preview-box {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

#editor-banner-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-position: center;
  filter: brightness(0.7);
}

.banner-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(10, 10, 10, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
}

.editor-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group.full-width {
  grid-column: span 2;
}

/* Buttons */
.action-btn {
  background: #ffffff;
  color: #060606;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
}

.action-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.add-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.add-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
}

.delete-btn {
  background: rgba(255, 68, 102, 0.08);
  border: 1px solid rgba(255, 68, 102, 0.2);
  color: var(--accent-red);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.delete-btn:hover {
  background: rgba(255, 68, 102, 0.12);
  border-color: var(--accent-red);
}

/* No Selection Placeholder */
.no-selection-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  padding: 80px 40px;
}

.no-selection-card p {
  font-size: 13px;
  max-width: 320px;
  line-height: 1.6;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  color: #060606;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 12px 24px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 1000;
}

.toast-notification.active {
  bottom: 30px;
}

.hidden {
  display: none !important;
}

/* Navigation Tabs */
.header-nav {
  display: flex;
  gap: 12px;
}

.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition-smooth);
}

.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-tab.active {
  color: var(--accent-primary);
  border-color: rgba(0, 188, 212, 0.2);
  background: rgba(0, 188, 212, 0.05);
}
