/* ==========================================================================
   CompletelyScience.io - Minimal Poki / Google Sites Style Sheet
   Ultra-fast, zero-bloat, distraction-free game portal (< 20KB)
   ========================================================================== */

:root {
  --bg-page: #0e121a;
  --bg-nav: rgba(14, 18, 26, 0.95);
  --bg-card: #181d28;
  --bg-card-hover: #222938;
  --bg-sidebar: #131722;
  --border-color: #232a3b;
  --border-hover: #3b455d;

  --accent-cyan: #38bdf8;
  --accent-blue: #2563eb;
  --accent-green: #10b981;
  --accent-gold: #f59e0b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --transition-fast: 0.18s ease;
}

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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

/* Container */
.page-container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top Navigation Bar */
.top-nav-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  height: 56px;
  display: flex;
  align-items: center;
}
.nav-inner {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.menu-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.menu-toggle-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}
.site-brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.3px;
}
.brand-text {
  color: #ffffff;
}
.accent-text {
  color: var(--accent-cyan);
}

/* Nav Search Box */
.nav-center {
  flex: 1;
  max-width: 500px;
}
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 6px 14px;
  gap: 8px;
  transition: all var(--transition-fast);
}
.search-box:focus-within {
  border-color: var(--accent-cyan);
  background: #1c2230;
}
.search-svg {
  color: var(--text-dim);
  flex-shrink: 0;
}
.search-box input {
  flex: 1;
  font-size: 13px;
  color: var(--text-main);
}
.search-box input::placeholder {
  color: var(--text-dim);
}

/* Nav Right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}
.quick-btn:hover {
  color: var(--text-main);
  border-color: var(--accent-cyan);
}

/* Slide-out Left Sidebar */
.left-sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  z-index: 10001;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
}
.left-sidebar.open {
  left: 0;
}
.sidebar-header {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 16px;
}
.sidebar-brand .highlight {
  color: var(--accent-cyan);
}
.close-sidebar-btn {
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}
.close-sidebar-btn:hover {
  color: #fff;
}
.sidebar-scroll {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.sidebar-heading {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.sidebar-link:hover, .sidebar-link.active {
  background: var(--bg-card);
  color: var(--text-main);
}
.sidebar-link.active {
  color: var(--accent-cyan);
  font-weight: 700;
}
.sidebar-link .bullet {
  color: var(--accent-cyan);
  font-size: 16px;
}
.text-links a {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-dim);
}
.text-links a:hover {
  color: var(--text-main);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 10000;
  display: none;
}
.sidebar-backdrop.open {
  display: block;
}

/* Page Body */
.page-body {
  flex: 1;
  padding: 18px 0 40px;
}

/* Poki-Style Games Grid */
.games-dense-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

/* Game Card */
.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  display: flex;
  flex-direction: column;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-cyan);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  background: var(--bg-card-hover);
}
.game-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.game-thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #090c12;
}
.game-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.game-card:hover .game-thumb {
  transform: scale(1.06);
}
.game-card-hover-overlay {
  position: absolute;
  inset: 0;
  background: rgba(14, 18, 26, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.play-icon-svg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-cyan);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}
.game-card:hover .game-card-hover-overlay {
  opacity: 1;
}
.game-card-title-wrap {
  padding: 8px 10px;
  text-align: center;
}
.game-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.game-stage-wrapper {
  max-width: 1140px;
  margin: 0 auto;
}
.player-container {
  background: #000;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 650px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8);
}
.player-container iframe,
.game-active-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* 6-Second Game Loading Illusion Screen */
.game-loading-screen {
  position: absolute;
  inset: 0;
  background: #090d16;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.loading-spinner-wrap {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 18px;
}
.loading-spinner-circle {
  width: 100%;
  height: 100%;
  border: 3px solid rgba(56, 189, 248, 0.15);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}
.loading-status-text {
  font-size: 13px;
  color: var(--accent-cyan);
  margin-bottom: 18px;
  min-height: 20px;
}
.loading-bar-track {
  width: 100%;
  max-width: 300px;
  height: 6px;
  background: #1a2233;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}
.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #0284c7);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  transition: width 6s cubic-bezier(0.1, 0.7, 0.2, 1);
}
.loading-pct-text {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

/* Play Splash Screen */
.player-splash {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.splash-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(14, 18, 26, 0.82) 0%, rgba(14, 18, 26, 0.98) 100%);
  backdrop-filter: blur(10px);
}
.splash-content {
  position: relative;
  z-index: 11;
  text-align: center;
  padding: 20px;
  max-width: 480px;
}
.splash-thumb {
  width: 88px;
  height: 88px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.35);
  margin: 0 auto 16px;
  object-fit: cover;
}
.splash-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}
.splash-cat {
  font-size: 13px;
  color: var(--accent-cyan);
  margin-bottom: 24px;
}
.launch-play-btn {
  background: linear-gradient(135deg, var(--accent-cyan), #0284c7);
  color: #000;
  font-weight: 800;
  font-size: 18px;
  padding: 14px 42px;
  border-radius: 40px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.launch-play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 35px rgba(56, 189, 248, 0.6);
}

/* Player Controls Bar */
.player-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 12px 18px;
  margin-bottom: 30px;
  gap: 12px;
  flex-wrap: wrap;
}
.player-title-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.player-game-name {
  font-size: 18px;
  font-weight: 700;
}
.player-category-tag {
  font-size: 12px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  padding: 2px 10px;
  border-radius: 12px;
  color: var(--text-muted);
}
.player-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.tool-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--text-main);
}
.tool-btn.active {
  color: #f43f5e;
  border-color: #f43f5e;
}

/* "More Games" Section (Immediately below player) */
.section-heading-clean {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Simple Clean Content Boxes */
.simple-content-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
}
.simple-content-box h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
}
.simple-content-box p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}
.simple-content-box p:last-child {
  margin-bottom: 0;
}
.controls-simple-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 10px;
}
.controls-simple-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
}
.controls-simple-table td:first-child {
  font-weight: 600;
  color: var(--accent-cyan);
  width: 35%;
}

/* Floating Panic Button (Bottom-Right) */
.panic-hide-floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99998;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid #475569;
  border-radius: 30px;
  padding: 8px 16px;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
}
.panic-hide-floating-btn:hover {
  transform: scale(1.05);
  background: #334155;
  border-color: var(--accent-cyan);
  box-shadow: 0 6px 24px rgba(56, 189, 248, 0.4);
}

/* Full-Screen Scientific Calculator Overlay */
.calculator-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  color: #f8fafc;
}
.calculator-topbar {
  height: 50px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.calc-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
}
.calc-return-btn {
  background: #334155;
  color: #f8fafc;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.calc-return-btn:hover {
  background: #475569;
}
.calculator-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.calc-device {
  width: 100%;
  max-width: 380px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.calc-display-screen {
  background: #090d16;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 18px;
  text-align: right;
  font-family: var(--font-mono);
}
.calc-history {
  font-size: 13px;
  color: #64748b;
  min-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calc-current-input {
  font-size: 28px;
  font-weight: 700;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calc-keypad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.calc-btn {
  height: 48px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  user-select: none;
}
.calc-btn:active {
  transform: scale(0.94);
}
.num-btn {
  background: #334155;
  color: #f8fafc;
}
.num-btn:hover {
  background: #475569;
}
.op-btn {
  background: #0284c7;
  color: #ffffff;
  font-weight: 700;
}
.op-btn:hover {
  background: #0369a1;
}
.fn-btn {
  background: #475569;
  color: #cbd5e1;
}
.fn-btn:hover {
  background: #64748b;
}
.sci-btn {
  background: #1e293b;
  border: 1px solid #334155;
  color: #38bdf8;
  font-size: 14px;
}
.sci-btn:hover {
  background: #334155;
}
.eq-btn {
  background: #10b981;
  color: #ffffff;
  font-weight: 800;
}
.eq-btn:hover {
  background: #059669;
}

/* Minimal Footer */
.site-simple-footer {
  background: #090c12;
  border-top: 1px solid var(--border-color);
  padding: 35px 0 20px;
  margin-top: auto;
}
.footer-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
  text-align: center;
}
.footer-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.footer-links-row a {
  color: var(--text-muted);
  font-size: 13px;
}
.footer-links-row a:hover {
  color: var(--accent-cyan);
}
.footer-seo-block {
  max-width: 800px;
  margin: 0 auto 16px;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.7;
}
.footer-seo-block strong, .footer-seo-block em {
  color: var(--text-muted);
}
.footer-copy-row {
  font-size: 12px;
  color: var(--text-dim);
}

/* Responsive Rules */
@media (max-width: 768px) {
  .player-container {
    min-height: 480px;
  }
  .games-dense-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
  }
  .hide-mobile {
    display: none;
  }
  .nav-center {
    max-width: none;
  }
}
@media (max-width: 480px) {
  .player-container {
    min-height: 340px;
  }
}

/* FAQ Accordion Styling */
.faq-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.faq-item {
  background: var(--bg-page);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  transition: border-color var(--transition-fast);
}
.faq-item[open] {
  border-color: var(--accent-cyan);
}
.faq-question {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-question::after {
  content: '+';
  font-size: 18px;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}
.faq-item[open] .faq-question::after {
  content: '−';
}
.faq-answer {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 10px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}
.faq-answer a {
  color: var(--accent-cyan);
  text-decoration: underline;
}
