/* =========================================================
   Lelefon — Global Styles (white/black theme)
   ========================================================= */

/* ---------- CSS Variables ---------- */
:root{
  --bg: #ffffff;
  --bg-soft: #fafafa;
  --text: #111111;
  --text-muted: #667085;
  --brand: #e11d48;
  --brand-weak: #ffe3ea;
  --border: #e6e6e6;
  --border-strong: #dddddd;
  --shadow: 0 6px 18px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --focus: 0 0 0 3px rgba(225,29,72,.20);
}

/* =========================================================
   Base
   ========================================================= */
*{ box-sizing:border-box }
html, body{ height:100% }
body{
  margin:0;
  background-color:var(--bg);
  color:var(--text);
  font-family:"Poppins","Segoe UI",system-ui,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
a{ color:inherit }

/* Containers */
.container{ width:min(1200px,92vw); margin:0 auto }
.wrap{ width:min(1100px,92vw); margin:24px auto }

/* Utilities */
.muted{ color:var(--text-muted); font-size:.95rem }
.right{ margin-left:auto }
.pill{ border:1px solid var(--border); padding:8px 12px; border-radius:999px }
.badge-small{ display:inline-block; padding:2px 8px; border-radius:999px; font-size:.75rem; font-weight:700; background:#111; color:#fff }
.badge{ display:inline-block; padding:4px 10px; border-radius:999px; border:1px solid var(--border); font-weight:700 }
.divider{ height:1px; width:100%; background:var(--border); margin:14px 0 }

/* Cards + Panels */
.card{
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:#fff;
  padding:14px;
}
.panel{
  border:1px dashed var(--border);
  border-radius:var(--radius);
  background:#fff;
  padding:12px;
}

/* Buttons */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:1px solid var(--border); background:#111; color:#fff;
  padding:10px 16px; border-radius:10px; font-weight:700; cursor:pointer;
  transition:transform .06s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover{ transform:translateY(-1px); box-shadow:var(--shadow) }
.btn:active{ transform:translateY(0) }
.btn:disabled{ opacity:.55; cursor:not-allowed; box-shadow:none; transform:none }
.btn.primary{ background:var(--brand); border-color:var(--brand) }
.btn.ghost{ background:#fff; color:var(--text); }
.btn.ghost:hover{ border-color:var(--text) }
.btn-row{ display:flex; gap:10px; flex-wrap:wrap }

/* Inputs / Fields */
.field{ display:flex; flex-direction:column; gap:6px }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], select, textarea{
  width:100%; border:1px solid var(--border); border-radius:10px; padding:10px 12px; background:#fff; color:var(--text);
}
input:focus, select:focus, textarea:focus{ outline:none; box-shadow:var(--focus); border-color:var(--brand) }

/* Tables (light) */
.table{ width:100%; border-collapse:separate; border-spacing:0; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden }
.table th, .table td{ padding:10px 12px; border-bottom:1px solid var(--border) }
.table th{ text-align:left; font-weight:700; background:var(--bg-soft) }
.table tr:last-child td{ border-bottom:none }

/* =========================================================
   Navbar
   ========================================================= */
.navbar{
  background-color:#f9f9f9;
  border-bottom:1px solid var(--border-strong);
  position:sticky; top:0; z-index:100;
}
.navbar-inner{
  width:min(1200px,92vw); margin:0 auto;
  display:flex; justify-content:space-between; align-items:center;
  padding:15px 0;
}
.logo-container{ display:flex; align-items:center }
.logo-link{ display:flex; align-items:center; gap:8px; text-decoration:none; color:#000 }
.logo{ width:80px; height:auto; object-fit:contain }
.navbar h1{ font-size:1.8rem; margin:0; font-weight:700; color:var(--text) }
.navbar nav a{ color:#000; margin-left:20px; text-decoration:none; font-weight:500; transition:color .2s }
.navbar nav a:hover{ color:var(--brand) }
.right-area{ display:flex; align-items:center; gap:10px }
.wallet-pill{ border:1px solid var(--border); border-radius:999px; padding:6px 12px; font-weight:700; background:#fff }

/* =========================================================
   Footer
   ========================================================= */
footer{
  text-align:center; padding:25px; background:var(--bg-soft);
  border-top:1px solid var(--border-strong); color:#555; font-size:.9rem;
}

/* =========================================================
   Home: Hero / Filters / Game Grid
   ========================================================= */
.hero{ text-align:center; padding:80px 20px 40px }
.hero h2{ font-size:2.3rem; margin:0 0 10px; font-weight:700; color:var(--text) }
.hero p{ color:#666 }

.filter-bar{
  display:flex; justify-content:center; gap:10px; margin:10px 0 25px; flex-wrap:wrap
}
.filter-btn{
  padding:8px 14px; border-radius:999px; border:1px solid #e0e0e0;
  background:#fff; color:var(--text); font-weight:600; cursor:pointer;
  transition:background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.filter-btn:hover{ box-shadow:0 4px 12px rgba(0,0,0,.06) }
.filter-btn.active{ background:var(--text); color:#fff; border-color:var(--text) }

.games-section{ text-align:center; padding:20px 0 80px; background:var(--bg) }
.games-section h3{ font-size:1.8rem; font-weight:600; margin-bottom:10px; color:var(--text) }

.game-grid{ display:flex; flex-wrap:wrap; justify-content:center; gap:30px }
.game-card{ width:210px; cursor:pointer; text-align:center }
.card-inner{
  aspect-ratio:1/1; border-radius:12px; overflow:hidden;
  border:1px solid var(--border); background:#fff; transition:transform .25s, box-shadow .25s;
}
.card-inner img{ width:100%; height:100%; object-fit:cover }
.game-card:hover .card-inner{ transform:translateY(-5px); box-shadow:var(--shadow) }
.game-title{ margin-top:10px; font-size:1rem; font-weight:600; color:#000 }

/* Limit grid items unless expanded */
.extra-card{ display:none }
.show-all .extra-card{ display:block }

.view-more-btn{
  margin-top:25px; padding:10px 22px; border:1px solid var(--brand);
  background:transparent; color:var(--brand); font-weight:600;
  border-radius:50px; cursor:pointer; transition:background .2s, color .2s;
}
.view-more-btn:hover{ background:var(--brand); color:#fff }

/* =========================================================
   Modal (Region Select — used on home)
   ========================================================= */
/* ---------- Region Card (Light) ---------- */
.region-card {
  cursor: pointer;
  position: relative;
  border-radius: 8px;  /* Slightly smaller border radius */
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px;  /* Reduced padding */
  cursor: pointer;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
  max-width: 80px; /* Scaled down the width */
  margin: 0 auto;
}

.region-card:hover {
  transform: translateY(-3px);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.region-thumb {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #f4f4f5;
  aspect-ratio: 1 / 1;
  width: 100%;
  height: 60px; /* Reduced height */
  box-shadow: 0 4px 12px rgba(0,0,0,.06); /* Smaller shadow */
  transition: transform .18s ease, box-shadow .18s ease;
}

.region-card:hover .region-thumb {
  transform: translateY(-2px); /* Slightly less movement */
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}

.region-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.region-name {
  margin-top: 4px; /* Reduced margin */
  font-weight: 600; /* Slightly smaller font */
  color: var(--text);
  font-size: 0.9rem; /* Smaller font */
}

.flag-badge {
  position: absolute;
  top: 4px;  /* Flag is now higher inside the card */
  right: 4px;
  width: 20px; /* Smaller flag */
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px; /* Smaller font size for flag */
  font-weight: 900;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  user-select: none;
}

.chip {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 4px 6px;  /* Smaller padding for the chip */
  border-radius: 6px;
  font-size: .65rem; /* Smaller chip font */
  font-weight: 600;
  letter-spacing: .2px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}

.chip.uid {
  background: #16a34a;
}

.chip.code {
  background: #ea8a00;
}


/* =========================================================
   Transactions Page & Status Colors
   ========================================================= */
.order{
  border:1px solid #eee; border-radius:var(--radius); padding:12px; margin-bottom:10px; background:#fff;
}
.order .head{ display:flex; gap:8px; justify-content:space-between; align-items:center }
.order .status{ padding:4px 10px; border-radius:999px; border:1px solid var(--border); font-weight:700; background:var(--bg-soft) }
.order .items{ margin-top:8px }

.status-processing{background:#e6f3ff;border-color:#8abef6;color:#1e62b3}
.status-completed{background:#eafcf1;border-color:#91dfb5;color:#155724}
.status-cancelled, .status-failed{background:#feecee;border-color:#f6b2bf;color:#721c24}
.status-pending{background:#f0f0f0;border-color:#ccc;color:#555}

/* =========================================================
   Product Page
   ========================================================= */
.crumbs a{ color:#111; text-decoration:none; opacity:.75 }
.crumbs a:hover{ opacity:1 }
.product-head{ display:flex; gap:18px; align-items:center; margin:8px 0 18px }
.product-head img{ width:72px; height:72px; border-radius:14px; border:1px solid var(--border); object-fit:cover }
.product-title h2{ margin:0; font-size:1.6rem }
.product-grid{ display:grid; grid-template-columns:2fr 1fr; gap:18px }
@media (max-width:900px){ .product-grid{ grid-template-columns:1fr } }
.pkg-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px }
@media (max-width:900px){ .pkg-grid{ grid-template-columns:repeat(2,1fr) } }
.pkg{
  border:1px solid var(--border); border-radius:var(--radius); padding:14px;
  background:#fff; cursor:pointer; text-align:left; transition:border-color .15s, box-shadow .2s;
}
.pkg:hover{ box-shadow:var(--shadow) }
.pkg.active{ outline:2px solid #111 }
.qty{ display:flex; align-items:center; gap:8px }
.qty input{ width:72px; text-align:center }
.price-row{ display:flex; justify-content:space-between; align-items:center; margin-top:8px; font-weight:800 }

/* =========================================================
   Responsive tweaks
   ========================================================= */
@media (max-width:900px){
  .navbar-inner{ padding:12px 0 }
}
@media (max-width:768px){
  .navbar-inner{ flex-direction:column; gap:10px }
  .game-card{ width:160px }
}

/* Add this to your existing homestyle.css or create the file */

/* --- General Responsive Enhancements --- */
body {
    font-size: 16px; /* Base font size */
}

.wrap, .container {
    width: min(1200px, 92vw); /* Keeps content from touching screen edges */
    margin: 24px auto;
}

/* --- Responsive Navbar --- */
.navbar-inner {
    padding: 0 4vw; /* Use viewport width for padding */
    flex-wrap: wrap; /* Allow items to wrap on small screens */
    gap: 10px;
}

.logo-container h1 {
    font-size: 1.2rem; /* Slightly smaller logo text on mobile */
}

.right-area {
    gap: 12px;
}

/* --- Media Query for Mobile and Tablet --- */
@media (max-width: 900px) {
    .navbar-inner {
        flex-direction: column; /* Stack logo and nav items vertically */
        align-items: flex-start;
        padding: 12px 4vw;
    }

    .right-area {
        width: 100%;
        flex-wrap: wrap; /* Allow nav links to wrap */
        justify-content: flex-start;
        font-size: 0.9rem;
    }

    .logo-container {
        margin-bottom: 10px;
    }
}