:root {
  --bg-gradient: linear-gradient(135deg, #dff1ff 0%, #e3ecff 40%, #f6eaff 100%);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #94a3b8;
  
  /* Brand Colors matching the logo and primary buttons */
  --brand-blue: #3b82f6;
  --brand-cyan: #06b6d4;
  --btn-gradient: linear-gradient(90deg, #3b49df 0%, #06b6d4 100%);
  
  /* Glass containers */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-strong: #ffffff;
  --glass-border: rgba(255, 255, 255, 0.6);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.08);
}

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

body {
  background: var(--bg-gradient);
  color: var(--text-main);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 60px;
}

.wrap { 
  max-width: 1140px; 
  margin: 0 auto; 
  padding: 0 24px; 
}

/* Floating Pill Navigation System */
.site-nav {
  margin: 24px auto;
  max-width: 1080px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 20px;
  z-index: 100;
}

.site-nav .wrap { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  height: 68px;
  max-width: 100%;
  padding: 0 28px;
}

.brand { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  text-decoration: none; 
  color: var(--text-main);
}

.brand .word {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.brand .word b { color: #2563eb; font-weight: 800; }
.brand .word i { font-style: normal; color: #06b6d4; font-weight: 700; }

.reel { 
  width: 26px; 
  height: 26px; 
  fill: none; 
  stroke: #2563eb; 
  stroke-width: 2.5; 
}

.nav-links { 
  display: flex; 
  gap: 28px; 
  align-items: center;
}

.nav-links a { 
  text-decoration: none; 
  color: var(--text-muted); 
  font-size: 0.92rem; 
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active { 
  color: var(--text-main); 
  font-weight: 600; 
}

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

/* Custom Profile Pill Badge */
.nav-username {
  background: rgba(99, 102, 241, 0.12); 
  color: #4f46e5; 
  padding: 6px 18px; 
  border-radius: 100px; 
  font-weight: 600;
  font-size: 0.88rem;
}

/* UI Controls & Pill Buttons */
.btn {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  background: var(--glass-bg-strong); 
  color: var(--text-main); 
  border: 1px solid rgba(15, 23, 42, 0.05); 
  padding: 10px 24px;
  border-radius: 100px; 
  cursor: pointer; 
  text-decoration: none; 
  font-weight: 600; 
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.btn-primary { 
  background: var(--btn-gradient); 
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-block { 
  width: 100%; 
  margin-top: 12px; 
}

/* Highly Rounded Central Display Cards */
.glass { 
  background: var(--glass-bg); 
  border: 1px solid var(--glass-border); 
  border-radius: 24px; 
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-strong { 
  background: var(--glass-bg-strong); 
  border: 1px solid var(--glass-border); 
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.form-card { 
  max-width: 480px; 
  margin: 60px auto 0; 
  padding: 40px; 
}
.form-card.wide { max-width: 720px; }
.center-text { text-align: center; }

/* Custom Form Card Typography */
.form-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--text-main);
}

.form-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

/* Arcade Shell View Grid Components */
.hero { 
  padding: 60px 0 40px; 
  text-align: center; 
}
.hero h1 { 
  font-size: 3.25rem; 
  font-weight: 800; 
  letter-spacing: -0.03em; 
  margin-bottom: 18px; 
}
.grad { 
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%); 
  -webkit-background-clip: text; 
  -webkit-text-fill-color: transparent; 
}
.hero p.sub { 
  max-width: 680px; 
  margin: 0 auto 32px; 
  color: var(--text-muted); 
  font-size: 1.15rem; 
}
.hero-actions { 
  display: flex; 
  justify-content: center; 
  gap: 16px; 
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0 20px;
}

.game-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
  gap: 28px; 
}

.game-card { 
  text-decoration: none; 
  color: inherit; 
  display: flex; 
  flex-direction: column; 
  overflow: hidden; 
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(15, 23, 42, 0.03);
}

.game-card:hover { 
  transform: translateY(-4px); 
  box-shadow: var(--shadow-lg);
}

.game-card .thumb { 
  height: 180px; 
  background: linear-gradient(135deg, #eff6ff 0%, #fae8ff 100%); 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  position: relative; 
  font-size: 3.5rem; 
  font-weight: 800; 
  color: rgba(15, 23, 42, 0.05); 
}

.game-card .body { 
  padding: 20px; 
  flex-grow: 1; 
  display: flex; 
  flex-direction: column; 
}

.game-card h3 { 
  font-size: 1.2rem; 
  margin-bottom: 8px; 
  font-weight: 700;
}

.game-card p { 
  font-size: 0.92rem; 
  color: var(--text-muted); 
  flex-grow: 1; 
  margin-bottom: 16px; 
}

.game-card .meta { 
  display: flex; 
  justify-content: space-between; 
  font-size: 0.82rem; 
  color: var(--text-faint); 
  font-weight: 500;
}

/* Interactive Forms Input Style Updates */
.field { margin-bottom: 20px; text-align: left; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-muted); }
.field input[type="text"], .field textarea { 
  width: 100%; 
  padding: 12px 16px; 
  background: #f8fafc; 
  border: 1px solid #e2e8f0; 
  border-radius: 12px; 
  color: var(--text-main); 
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.field input:focus, .field textarea:focus { 
  outline: none; 
  border-color: #3b82f6; 
  background: #ffffff;
}

/* Modals & Layout Tweaks */
.arcade-cabinet { display: grid; grid-template-columns: 1fr 340px; gap: 32px; margin-top: 30px; }
.screen-container { position: relative; width: 100%; padding-top: 56.25%; background: #000; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
#sandbox-runtime { position: absolute; top:0; left:0; width:100%; height:100%; border:none; }
.cabinet-sidebar .panel { padding: 24px; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 8px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.badge.pending { background: #fef9c3; color: #713f12; }
.badge.approved { background: #dcfce7; color: #14532d; }
.badge.rejected { background: #fee2e2; color: #7f1d1d; }

.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 12px; }
.toast { padding: 14px 28px; border-radius: 12px; color: #fff; font-size: 0.92rem; font-weight: 600; box-shadow: 0 10px 25px rgba(0,0,0,0.15); animation: slideIn 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.toast.success { background: #10b981; }
.toast.error { background: #ef4444; }

@keyframes slideIn { from { transform: translateX(110%); } to { transform: translateX(0); } }

/* Structural Overrides to handle long descriptions and screen layout */
.arcade-cabinet {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .arcade-cabinet {
    grid-template-columns: 1fr;
  }
}

/* Enforcing standard landscape view proportions */
.screen-container {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #090d16;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid #ffffff;
}

#sandbox-runtime {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Safe word break wrapping across card assets */
.cabinet-sidebar .panel {
  padding: 24px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.description-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap; /* Preserves author line breaks gracefully */
}

/* Interaction Layout styles */
.rating-box {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}

.rate-btn {
  flex: 1;
  font-size: 0.95rem;
  padding: 10px;
}

.active-like { background: #dcfce7 !important; border-color: #22c55e !important; color: #15803d !important; }
.active-dislike { background: #fee2e2 !important; border-color: #ef4444 !important; color: #b91c1c !important; }

/* Expanded Moderation Container views */
.flex-column { flex-direction: column !important; align-items: stretch !important; gap: 16px; }
.admin-preview-window {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 2px dashed var(--text-faint);
  background: #000;
}

.review-iframe-element {
  width: 100%;
  height: 100%;
  border: none;
}

.queue-meta-header {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Comments System styling */
.comments-section {
  margin-top: 32px;
  padding: 32px;
}

.comment-input-block {
  display: flex;
  flex-direction: column;
  margin-top: 15px;
}

.comment-input-block textarea {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  resize: vertical;
}

.comment-row {
  padding: 16px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 0.95rem;
}

.comment-row p {
  margin-top: 4px;
  color: var(--text-muted);
}

.hint {
  font-size: 0.85rem;
  color: var(--text-faint);
}
