/* ==========================================================================
   R3W1ND STUDIOS — Luminous Electric Blue Edition (polished)
   A bright, hyper-reflective, 3D glassmorphic arcade experience.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-void: #f1f5f9;
  --bg-deep: #e2e8f0;
  --bg-deep-2: #cbd5e1;

  --accent-cyan: #06b6d4;
  --accent-blue: #2563eb;
  --accent-indigo: #4f46e5;
  --accent-magenta: #0284c7;

  --glass-fill: rgba(255, 255, 255, 0.5);
  --glass-fill-strong: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-border-hover: rgba(37, 99, 235, 0.35);

  --text-primary: #0f172a;
  --text-muted: #47536b;
  --text-faint: #5c6a86;

  --status-pending: #b45309;
  --status-approved: #047857;
  --status-rejected: #b91c1c;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;

  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  --shadow-glass: 0 15px 35px rgba(37, 99, 235, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04);
  --shadow-3d-lift: 0 30px 60px rgba(37, 99, 235, 0.18), 0 10px 20px rgba(0, 0, 0, 0.06);
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-void);
  background-image:
    radial-gradient(circle at 15% 15%, rgba(6, 182, 212, 0.22), transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.18), transparent 50%),
    radial-gradient(circle at 50% 85%, rgba(79, 70, 229, 0.14), transparent 60%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(37, 99, 235, 0.014) 0px,
    rgba(37, 99, 235, 0.014) 1px,
    transparent 1px,
    transparent 4px
  );
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: 0.01em; }
p { line-height: 1.6; color: var(--text-muted); margin: 0 0 1em; }
button, input, textarea { font-family: inherit; color: inherit; }
code { font-family: 'Courier New', monospace; background: rgba(37,99,235,0.08); padding: 1px 6px; border-radius: 5px; font-size: 0.9em; }

::selection { background: var(--accent-cyan); color: #ffffff; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

/* ---------- glass primitives ---------- */
.glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow: var(--shadow-glass);
}

.glass-strong {
  background: var(--glass-fill-strong);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  box-shadow: var(--shadow-3d-lift);
}

/* ---------- nav ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; padding: 20px 0; }

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  margin: 0 auto;
  max-width: 1180px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.06);
}

.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.08rem; letter-spacing: 0.06em; white-space: nowrap; }
.brand .reel { width: 26px; height: 26px; flex-shrink: 0; }
.brand .reel circle.rim { fill: none; stroke: var(--accent-indigo); stroke-width: 2.5; }
.brand .reel circle.hub { fill: var(--accent-cyan); }
.brand .reel circle.hole { fill: var(--bg-void); }
.brand:hover .reel { animation: spin-reel 1.4s linear infinite; }
@keyframes spin-reel { to { transform: rotate(360deg); } }
.brand .word b { color: var(--accent-indigo); }
.brand .word i { color: var(--accent-cyan); font-style: normal; }

.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a, .nav-links button.nav-link {
  padding: 8px 18px; border-radius: 999px; font-size: 0.92rem; font-weight: 600;
  color: var(--text-muted); background: transparent; border: 1px solid transparent;
  cursor: pointer; transition: all 0.25s var(--ease);
}
.nav-links a:hover, .nav-links button.nav-link:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.65); border-color: rgba(37, 99, 235, 0.15); }
.nav-links a.active { color: #ffffff; background: var(--accent-blue); box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3); }

.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-username { font-size: 0.88rem; font-weight: 600; color: var(--accent-indigo); padding: 6px 14px; background: rgba(79, 70, 229, 0.08); border: 1px solid rgba(79, 70, 229, 0.15); border-radius: 999px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.7); color: var(--text-primary);
  font-weight: 600; font-size: 0.94rem; cursor: pointer;
  transition: all 0.28s var(--ease); box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.btn:hover { border-color: var(--accent-blue); background: #ffffff; transform: translateY(-2px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.12); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-block { width: 100%; }

.btn-primary { background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan)); color: #ffffff; border: none; box-shadow: 0 8px 25px rgba(37, 99, 235, 0.25); }
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan)); border-color: transparent; filter: brightness(1.06); box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35); }

.btn-approve { color: var(--status-approved); border-color: rgba(4, 120, 87, 0.3); }
.btn-approve:hover { background: rgba(4, 120, 87, 0.08); border-color: var(--status-approved); }
.btn-danger { color: var(--status-rejected); border-color: rgba(185, 28, 28, 0.3); }
.btn-danger:hover { background: rgba(185, 28, 28, 0.08); border-color: var(--status-rejected); }

.btn-google { background: #ffffff; color: #1f1f1f; border: 1px solid rgba(0,0,0,0.1); font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.btn-google svg { width: 18px; height: 18px; }
.btn-google:hover { background: #f7f7f7; border-color: rgba(0,0,0,0.18); color: #1f1f1f; }

/* ---------- hero ---------- */
.hero { padding: 80px 0 60px; text-align: center; position: relative; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-indigo);
  padding: 8px 18px; border: 1px solid rgba(79, 70, 229, 0.2); border-radius: 999px;
  background: rgba(79, 70, 229, 0.05); margin-bottom: 28px;
}
.hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-cyan); box-shadow: 0 0 10px var(--accent-cyan); animation: pulse-dot 1.6s ease-in-out infinite; }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.1; font-weight: 800; margin-bottom: 24px; color: var(--text-primary); }
.hero h1 .grad { background: linear-gradient(125deg, var(--accent-indigo), var(--accent-blue), var(--accent-cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .sub { max-width: 620px; margin: 0 auto 38px; font-size: 1.12rem; color: var(--text-muted); }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- sections ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 40px 0 26px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.6rem; color: var(--text-primary); }
.section-head .count { color: var(--text-faint); font-size: 0.9rem; font-weight: 600; }

/* ---------- game cards ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 26px; padding: 10px 0 80px; }

.game-card {
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  background: rgba(255, 255, 255, 0.5);
}
.game-card:hover { transform: translateY(-8px); border-color: rgba(37, 99, 235, 0.25); box-shadow: var(--shadow-3d-lift); }

.game-card .thumb {
  height: 148px; position: relative;
  background: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(6,182,212,0.12));
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border-bottom: 1px solid var(--glass-border);
}
.game-card .thumb .glyph { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--accent-blue); text-shadow: 0 5px 15px rgba(37, 99, 235, 0.15); }

.rec-badge {
  position: absolute; top: 12px; left: 12px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
  display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.88); border: 1px solid rgba(0,0,0,0.05); color: var(--text-primary);
}
.rec-badge .r-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-cyan); box-shadow: 0 0 6px var(--accent-cyan); }

.game-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.game-card h3 { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.game-card p { font-size: 0.88rem; margin: 0; flex: 1; color: var(--text-muted); }
.game-card .meta { display: flex; align-items: center; justify-content: space-between; font-size: 0.76rem; color: var(--text-faint); margin-top: 4px; font-weight: 600; }

.empty-state { text-align: center; padding: 64px 30px; color: var(--text-faint); }
.empty-state h3 { color: var(--text-primary); margin-bottom: 8px; font-family: var(--font-body); }

/* ---------- arcade cabinet (game player) ---------- */
.arcade-cabinet { display: grid; grid-template-columns: 1fr; gap: 26px; padding: 30px 0 40px; }
@media (min-width: 900px) { .arcade-cabinet { grid-template-columns: 1fr 320px; } }

.back-link { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 18px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.back-link:hover { color: var(--accent-blue); }

.screen-container {
  background: #0f172a; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-3d-lift), 0 0 40px rgba(6, 182, 212, 0.14);
  border: 4px solid rgba(255, 255, 255, 0.85); aspect-ratio: 16 / 10; position: relative;
}
.screen-container iframe { width: 100%; height: 100%; border: none; background: #ffffff; }

.cabinet-sidebar { display: flex; flex-direction: column; gap: 20px; }
.cabinet-sidebar .panel { padding: 24px; }
.cabinet-sidebar hr { border: none; border-top: 1px solid rgba(0,0,0,0.06); margin: 16px 0; }

.source-panel { padding: 30px; margin-bottom: 60px; display: none; }
.code-editor-textarea {
  font-family: 'Courier New', monospace; font-size: 0.85rem; line-height: 1.5;
  background: rgba(15, 23, 42, 0.035) !important; color: #0f172a;
}

/* ---------- forms ---------- */
.form-card { padding: 38px; max-width: 480px; margin: 0 auto; background: rgba(255,255,255,0.62); border-color: rgba(255,255,255,0.9); }
.form-card.wide { max-width: 720px; }

.field { margin-bottom: 20px; }
.field label { display: block; font-size: 0.86rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.field .hint { font-size: 0.78rem; color: var(--text-faint); margin-top: 6px; }
.field .error { font-size: 0.8rem; color: var(--status-rejected); margin-top: 6px; display: none; font-weight: 600; }
.field.has-error .error { display: block; }
.field.has-error input, .field.has-error textarea { border-color: var(--status-rejected); }

input[type="text"], input[type="file"], textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.15); background: rgba(255, 255, 255, 0.78);
  color: var(--text-primary); font-size: 0.96rem; transition: all 0.25s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
input:focus, textarea:focus { border-color: var(--accent-blue); background: #ffffff; outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }

.app-error-box {
  margin: 0 0 20px; padding: 14px 16px; background: rgba(185, 28, 28, 0.07);
  border: 1px solid rgba(185, 28, 28, 0.2); color: var(--status-rejected);
  border-radius: var(--radius-sm); font-size: 0.86rem; font-weight: 500; line-height: 1.5;
}

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 4px 11px; border-radius: 999px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pending { color: var(--status-pending); background: rgba(180, 83, 9, 0.1); }
.badge.approved { color: var(--status-approved); background: rgba(4, 120, 87, 0.1); }
.badge.rejected { color: var(--status-rejected); background: rgba(185, 28, 28, 0.1); }

/* ---------- review rows (submissions / admin queue) ---------- */
.review-row { display: flex; gap: 18px; padding: 20px 22px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.review-row .info { flex: 1; min-width: 220px; }
.review-row h3 { font-size: 1.02rem; margin-bottom: 4px; }
.review-row .by { font-size: 0.8rem; color: var(--text-faint); margin-bottom: 8px; font-weight: 600; }
.review-row .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- modal ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 20px; }
.modal-overlay[hidden] { display: none; }
.modal { width: 100%; max-width: 900px; padding: 32px; position: relative; }
.modal .close-x { position: absolute; top: 18px; right: 18px; background: transparent; border: none; color: var(--text-faint); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal .preview-screen { border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--glass-border); height: 55vh; background: #0f172a; }
.modal .preview-screen iframe { width: 100%; height: 100%; border: 0; background: #fff; }

/* ---------- toasts ---------- */
.toast-stack { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 10px; z-index: 300; }
.toast { padding: 14px 22px; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; max-width: 340px; background: #ffffff; border-left: 4px solid var(--accent-blue); box-shadow: var(--shadow-3d-lift); animation: toast-in 0.35s var(--ease); color: var(--text-primary); }
.toast.error { border-left-color: var(--status-rejected); }
.toast.success { border-left-color: var(--status-approved); }
@keyframes toast-in { from { opacity: 0; transform: translateY(15px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- misc ---------- */
.site-footer { padding: 60px 0; text-align: center; color: var(--text-faint); font-size: 0.86rem; font-weight: 500; border-top: 1px solid rgba(0,0,0,0.05); margin-top: 30px; }
.loading-block { display: flex; align-items: center; justify-content: center; padding: 60px 0; color: var(--text-faint); gap: 10px; font-size: 0.94rem; font-weight: 600; }
.spinner-reel { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(37,99,235,0.12); border-top-color: var(--accent-blue); animation: spin-reel 0.8s linear infinite; }
.center-text { text-align: center; }

@media (max-width: 640px) {
  .site-nav .wrap { flex-wrap: wrap; border-radius: 24px; padding: 14px; }
  .hero { padding: 56px 0 40px; }
  .form-card { padding: 26px; }
}
