/* Dark minimal theme for mimpiplay */
:root {
  color-scheme: dark;
  --bg-primary: #0f141b;
  --bg-secondary: #161d27;
  --bg-elevated: #1e2735;
  --bg-accent: #24344a;
  --text-primary: #f5f7fa;
  --text-secondary: #c9d1de;
  --accent: #5cc3ff;
  --accent-strong: #39a3ff;
  --border: rgba(255, 255, 255, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 18px 38px rgba(3, 14, 30, 0.35);
  font-size: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: radial-gradient(circle at top, rgba(54, 91, 153, 0.35), transparent 55%), var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-strong);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header{display:flex;align-items:center;justify-content:space-between;padding:12px 20px;background:#0f1a24;position:sticky;top:0;z-index:50}
.site-header .brand{font-weight:700;color:#fff;text-decoration:none}
.nav-toggle{background:#132532;border:1px solid #2b4154;color:#e7f2ff;border-radius:10px;padding:8px 10px;font-size:18px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}

.drawer{
  position:fixed; inset:0 0 0 auto; width:280px; background:#0f1a24;
  box-shadow:-10px 0 30px rgba(0,0,0,.4);
  transform:translateX(100%); transition:transform .25s ease;
  z-index:1000; padding:20px;
}
.drawer.open{ transform:translateX(0) }
.drawer-nav{ display:flex; flex-direction:column; gap:14px }
.drawer-nav a{ color:#cfe7ff; text-decoration:none }
.drawer-nav a:hover{ color:#fff }

.backdrop{
  position:fixed; inset:0; background:rgba(0,0,0,.35);
  opacity:0; visibility:hidden; transition:opacity .25s ease, visibility .25s;
  z-index:999;
}
.backdrop.show{ opacity:1; visibility:visible }

.menu, #menu { display:none !important; }

.hero {
  text-align: center;
  padding: 3.5rem 0 1rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin-bottom: 0.5rem;
}

.hero p {
  color: var(--text-secondary);
  margin: 0 auto 1.5rem;
  max-width: 540px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

#searchInput {
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.75rem 1.1rem;
  min-width: min(360px, 80vw);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

#searchInput:focus {
  outline: none;
  border-color: rgba(92, 195, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(92, 195, 255, 0.15);
}

.result-count {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 2.5rem 0 4rem;
}

.game-card {
  background: rgba(30, 39, 53, 0.85);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.02);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  display: flex;
}

.game-card .card-link {
  display: flex;
  flex-direction: column;
  width: 100%;
  color: inherit;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(92, 195, 255, 0.18);
}

.thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 0.9rem 1rem 1.2rem;
}

.card-body h2 {
  font-size: 1.1rem;
  margin: 0 0 0.4rem;
}

.card-body p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.callout {
  background: var(--bg-elevated);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.callout h2 {
  margin-top: 0;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(15, 20, 27, 0.85);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 2rem 0 1rem;
}

.breadcrumb span[aria-hidden="true"] {
  opacity: 0.6;
}

.game-page .game-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.game-page .game-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.8rem);
}

.meta {
  color: var(--text-secondary);
  margin-top: 0.4rem;
}

.game-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.action-btn {
  background: var(--bg-accent);
  border: 1px solid transparent;
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.action-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 12px;
  position: relative;
  z-index: 3;
}

.game-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: #0c1620;
}

.game-wrap::before,
.game-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.game-iframe {
  width: 100%;
  height: 60vh;
  border: 0;
  position: relative;
  z-index: 2;
  display: block;
  background: #000;
}

.click-to-play {
  z-index: 4;
}

.ad-slot {
  margin: 1.5rem 0 2rem;
}

.ad-placeholder {
  border: 1px dashed rgba(92, 195, 255, 0.35);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  background: rgba(36, 52, 74, 0.4);
}

.game-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.game-details article {
  background: rgba(30, 39, 53, 0.7);
  padding: 1.4rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.game-details h2 {
  margin-top: 0;
}

.game-details ul {
  padding-left: 1.1rem;
  margin: 0;
  color: var(--text-secondary);
}

.similar {
  margin-bottom: 4rem;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.mini-card {
  background: rgba(30, 39, 53, 0.7);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.2s ease;
}

.mini-card:hover {
  transform: translateY(-3px);
}

.mini-card img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  object-fit: cover;
}

.mini-card h3 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.legal-page {
  padding: 3rem 0 4rem;
  max-width: 720px;
}

.legal-page h1 {
  margin-top: 0;
}

.legal-page section + section {
  margin-top: 1.5rem;
}

.source-list {
  list-style: disc;
  padding-left: 1.4rem;
  color: var(--text-secondary);
}

.hidden {
  display: none !important;
}

.ad-slot,
#ad-below-game,
.ad-container {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: rgba(36, 52, 74, 0.95);
  color: var(--text-primary);
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(92, 195, 255, 0.3);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  z-index: 200;
}

.toast--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  .game-page .game-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .game-iframe {
    height: 55vh;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

