@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');

:root {
  --bg-color: #0c091a;
  --bg-gradient: linear-gradient(135deg, #0c091a 0%, #170f33 100%);
  --panel-bg: rgba(28, 22, 59, 0.45);
  --panel-bg-solid: #161033;
  --panel-border: rgba(255, 255, 255, 0.08);
  --panel-border-hover: rgba(168, 85, 247, 0.4);
  
  --primary: #a855f7;
  --primary-glow: rgba(168, 85, 247, 0.35);
  --secondary: #06b6d4;
  --secondary-glow: rgba(6, 182, 212, 0.35);
  
  --accent: #ff4757;
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.2);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.25);
  
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --font-main: 'Outfit', sans-serif;
  --font-header: 'Rajdhani', sans-serif;
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--primary);
}

/* Header & Navigation */
header {
  background: rgba(12, 9, 26, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  padding: 1.25rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo {
  font-family: var(--font-header);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  font-size: 1.5rem;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.btn-nav {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  transition: all var(--transition-speed);
}

.btn-nav.active, .btn-nav:hover {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 0 15px var(--primary-glow);
}

/* Main Layout */
main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}

/* Glassmorphism Containers */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-header);
  font-weight: 700;
  letter-spacing: 0.5px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  background: linear-gradient(90deg, #fff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  border-left: 4px solid var(--primary);
  padding-left: 1rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
}

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

/* Grid & Layout Columns */
.split-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
}

@media (max-width: 968px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

/* Interactive Cards */
.grid-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.game-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.game-card:hover {
  transform: translateY(-5px);
  background: rgba(168, 85, 247, 0.05);
  border-color: var(--panel-border-hover);
  box-shadow: 0 10px 25px rgba(168, 85, 247, 0.15);
}

.game-card.selected {
  background: rgba(168, 85, 247, 0.12);
  border-color: var(--primary);
  box-shadow: 0 0 25px var(--primary-glow);
}

.game-card-img {
  width: 90px;
  height: 90px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.08);
  transition: transform var(--transition-speed);
}

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

.game-card-name {
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-row {
  display: flex;
  gap: 1rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--panel-border);
  color: white;
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all var(--transition-speed);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 10px var(--secondary-glow);
  background: rgba(0, 0, 0, 0.4);
}

/* Product Options */
.products-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.product-option {
  border: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: all var(--transition-speed);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100px;
}

.product-option:hover {
  background: rgba(6, 182, 212, 0.04);
  border-color: rgba(6, 182, 212, 0.3);
}

.product-option.selected {
  background: rgba(6, 182, 212, 0.1);
  border-color: var(--secondary);
  box-shadow: 0 0 15px var(--secondary-glow);
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
}

.product-price {
  font-size: 1.15rem;
  font-family: var(--font-header);
  color: var(--secondary);
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 12px;
  font-family: var(--font-header);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-speed);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
  width: 100%;
  margin-top: 1rem;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.5);
  filter: brightness(1.1);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

/* QRIS Payment Module */
.qris-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.qris-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  background: white;
  padding: 0.75rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.qris-header img {
  height: 25px;
}

.qris-qr-container {
  background: white;
  padding: 1.5rem;
  border-radius: 16px;
  display: inline-block;
  margin-bottom: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.qris-qr-container img {
  display: block;
  width: 100%;
  max-width: 250px;
  height: auto;
  margin: 0 auto;
}

.timer-box {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.2);
  color: var(--accent);
  padding: 0.75rem;
  border-radius: 10px;
  font-family: var(--font-header);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.amount-container {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--panel-border);
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.amount-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.amount-value {
  font-family: var(--font-header);
  font-size: 2.25rem;
  font-weight: 800;
  color: white;
  margin: 0.5rem 0;
  letter-spacing: 0.5px;
}

.unique-digits {
  color: var(--warning);
  text-shadow: 0 0 10px var(--warning-glow);
  font-size: 2.5rem;
  font-weight: 900;
}

.amount-warning {
  color: var(--warning);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-top: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  justify-content: center;
}

/* Status Indicator */
.status-spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid rgba(6, 182, 212, 0.2);
  border-radius: 50%;
  border-top-color: var(--secondary);
  animation: spin 1s ease-in-out infinite;
}

.status-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1rem;
}

/* SUCCESS SCREEN animation */
.success-animation {
  padding: 2rem 0;
}

.checkmark-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--success-glow);
  border: 3px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.checkmark-icon {
  font-size: 3rem;
  color: var(--success);
  animation: rotateIn 0.5s ease-in-out;
}

/* Admin Dashboard Elements */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.metric-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.metric-card:nth-child(2) .metric-icon {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--secondary);
}

.metric-card:nth-child(3) .metric-icon {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.metric-info h3 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.metric-info p {
  font-family: var(--font-header);
  font-size: 1.75rem;
  font-weight: 700;
}

/* Admin Panels split */
.admin-split {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (max-width: 1024px) {
  .admin-split {
    grid-template-columns: 1fr;
  }
}

/* Mutation Simulator UI */
.simulation-panel {
  background: rgba(0,0,0,0.2);
  border-radius: 16px;
  padding: 1.5rem;
  border: 1px solid var(--panel-border);
}

.connection-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-simulating {
  background: rgba(6, 182, 212, 0.15);
  color: var(--secondary);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.status-connected {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-disconnected {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Tables styling */
.table-container {
  overflow-x: auto;
  margin-top: 1rem;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  border: 1px solid var(--panel-border);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th, td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--panel-border);
}

th {
  background: rgba(0,0,0,0.3);
  font-family: var(--font-header);
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  color: var(--text-secondary);
}

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

tr:hover td {
  background: rgba(255,255,255,0.01);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-expired {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  font-family: var(--font-header);
  font-weight: 600;
  transition: all var(--transition-speed);
}

.btn-confirm {
  background: var(--success);
  color: white;
}

.btn-confirm:hover {
  background: #059669;
  box-shadow: 0 0 10px var(--success-glow);
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--panel-border);
  color: var(--text-muted);
  font-size: 0.9rem;
  background: rgba(12, 9, 26, 0.5);
  margin-top: auto;
}

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

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

@keyframes rotateIn {
  from { transform: rotate(-180deg); opacity: 0; }
  to { transform: rotate(0); opacity: 1; }
}

.pulse {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.2); }
  50% { box-shadow: 0 0 15px rgba(245, 158, 11, 0.6); }
  100% { box-shadow: 0 0 5px rgba(245, 158, 11, 0.2); }
}

/* ===================== */
/* Toggle Switch (Email Enable) */
/* ===================== */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--panel-border);
  border-radius: 9999px;
  transition: all 0.3s ease;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-slider {
  background: rgba(16, 185, 129, 0.25);
  border-color: var(--success);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(24px);
  background: var(--success);
  box-shadow: 0 0 8px var(--success-glow);
}

/* Provider Selection Buttons */
.btn-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.5rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--panel-border);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-provider:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: white;
}

.btn-provider.active {
  background: rgba(6, 182, 212, 0.12);
  border-color: var(--secondary);
  color: var(--secondary);
  box-shadow: 0 0 12px var(--secondary-glow);
}

/* Email status connected pulse */
@keyframes pulse-connected {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

