/**
 * ZZERSS BET - Mobil %100 uyumlu stil
 * iPhone, Android, tüm cihazlar - viewport, safe-area, 44px dokunma alanları
 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: #fff;
  background: #0a0a0f;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  padding: 0;
  padding env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  overflow-x: hidden;
}
a { color: #dc3545; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:active { opacity: 0.85; }
input, button, select, textarea {
  font: inherit;
  font-size: 16px; /* iOS zoom önleme */
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
}
input:focus, button:focus { outline: none; }

/* Minimum 44px dokunma hedefi (Apple HIG) */
.m-btn, .m-nav a, .m-card-tap, button[type="submit"], .m-link-block {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

/* Mobil header */
.m-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #0d0d12;
  border-bottom: 1px solid #222;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.m-header-title { font-size: 1.125rem; font-weight: 700; color: #fff; }
.m-header-back {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.m-balance {
  font-size: 0.9rem;
  font-weight: 600;
  color: #00e701;
}

/* Header with sidebar (hamburger) on all m/ pages */
.m-header-with-sidebar {
  display: flex;
  align-items: center;
  gap: 8px;
}
.m-header-with-sidebar .m-header-menu-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: none;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.m-header-with-sidebar .m-header-title { flex: 1; min-width: 0; }
.m-header-with-sidebar .m-balance { flex-shrink: 0; }

/* İçerik alanı - safe area alt */ - safe area alt */
.m-content {
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 100%;
}

/* Form - mobil */
.m-form .m-field { margin-bottom: 16px; }
.m-form label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: #9ca3af; }
.m-form input[type="email"],
.m-form input[type="password"],
.m-form input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  background: #1a1a22;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
}
.m-form .m-btn-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 8px;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.m-form .m-btn-submit:active { opacity: 0.9; }
.m-form .m-error { color: #ef4444; font-size: 0.85rem; margin-top: 6px; }

/* Menü / grid - ana sayfa */
.m-home-nav {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.m-home-nav a {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #14141c;
  border-radius: 12px;
  border: 1px solid #252530;
  color: #fff;
  font-weight: 500;
  -webkit-tap-highlight-color: transparent;
}
.m-home-nav a:active { background: #1a1a24; }
.m-home-nav .icon { font-size: 1.25rem; width: 28px; text-align: center; color: #dc3545; }
.m-home-nav .badge { margin-left: auto; font-size: 0.7rem; padding: 2px 8px; border-radius: 6px; background: #dc3545; color: #fff; }

/* Slot / oyun kartları - 2 sütun */
.m-game-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.m-game-card {
  background: #14141c;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #252530;
  -webkit-tap-highlight-color: transparent;
}
.m-game-card a { display: block; color: inherit; min-height: auto; padding: 0; }
.m-game-card:active { opacity: 0.95; }
.m-game-card .img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.m-game-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.m-game-card .play-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0,0,0,0.9));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px;
}
.m-game-card .play-overlay span {
  background: #00e701;
  color: #0a0a0f;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}
.m-game-card .info { padding: 10px; }
.m-game-card .title { font-size: 0.8rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-game-card .provider { font-size: 0.7rem; color: #6b7280; margin-top: 4px; }

/* Arama */
.m-search {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px 10px 40px;
  background: #1a1a22;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  margin-bottom: 14px;
}
.m-search-wrap { position: relative; margin-bottom: 16px; }
.m-search-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #6b7280; font-size: 1rem; pointer-events: none; }

/* Alt navigasyon - güvenli alan */
.m-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0d0d12;
  border-top: 1px solid #222;
  padding: 8px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: space-around;
  z-index: 99;
}
.m-bottom-nav a {
  flex: 1;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #6b7280;
  font-size: 0.7rem;
  -webkit-tap-highlight-color: transparent;
}
.m-bottom-nav a.active { color: #dc3545; }
.m-bottom-nav a .ico { font-size: 1.25rem; }

/* Sayfa içeriği alt nav varsa padding */
.m-has-bottom-nav .m-content { padding-bottom: 80px; }

/* Boş / hata */
.m-empty {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}
.m-empty .ico { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }
