/* =========================
   RTL THEME (9oloob)
   Consistent + Clean
   ========================= */

/* ===== Variables ===== */
:root{
  --bg: #e9efc9;
  --panel: rgba(255,255,255,0.35);
  --panel-solid: #eef3d0;

  --green-1: #b7c95a;   /* top light green */
  --green-2: #6f7f2c;   /* dark green band */
  --green-3: #cbd98a;   /* nav strip */

  --text: #1f1f1f;
  --muted: rgba(31,31,31,0.75);
  --link: #1a2a0a;

  --radius: 18px;
  --shadow: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-soft: 0 6px 16px rgba(0,0,0,0.07);
  --border: 1px solid rgba(0,0,0,0.10);
}

*{ box-sizing: border-box; }

html, body { height: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tahoma", "Arial", sans-serif;
  direction: rtl;
}

/* ===== Links ===== */
a{ color: var(--link); }
a:hover{ opacity: 0.95; }

/* =========================
   HEADER (matches your model)
   ========================= */
.site-header{
  background: linear-gradient(to left, #c9d96e, #b8cc5a);
}

/* top zone: logo */
.header-inner{
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;

  display: flex;
  align-items: center;
  justify-content: flex-start; /* start in RTL = right */
}

.logo img{
  height: 90px;
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.25));
  transition: transform 0.2s ease;
}

.logo img:hover{
  transform: scale(1.05);
}

/* middle dark band */
.midbar{
  background: var(--green-2);
  padding: 14px 0;
}

.midbar-inner{
  width: min(1100px, 92vw);
  margin: 0 auto;
  color: #eef6d2;
  font-weight: 700;
  font-size: 18px;
  text-align: center;
}

/* nav strip */
.nav{
  background: var(--green-3);
  border-top: var(--border);
  border-bottom: var(--border);
}

.nav-list{
  width: min(1100px, 92vw);
  margin: 0 auto;
  padding: 0;
  list-style: none;

  display: flex;
  flex-direction: row-reverse; /* first item on the right */
  gap: 26px;
  align-items: center;
  height: 54px;
}

.nav-list a{
  text-decoration: none;
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 10px;
}

.nav-list a:hover{
  background: rgba(255,255,255,0.35);
}

/* =========================
   LAYOUT
   ========================= */
.container{
  width: min(1100px, 92vw);
  margin: 28px auto 60px auto;
  padding: 0 8px;
}

/* reusable card */
.card{
  background: var(--panel);
  border-radius: var(--radius);
  padding: 18px;
  margin: 14px 0;
  box-shadow: var(--shadow-soft);
}

/* large content panel (home hero, forms container...) */
.panel{
  background: var(--panel-solid);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
  min-height: 55vh;
}

/* =========================
   TYPOGRAPHY
   ========================= */
.h1{
  font-size: 46px;
  margin: 6px 0 12px;
  font-weight: 900;
  text-align: center;
}

.h2{
  font-size: 24px;
  margin: 0 0 10px;
  font-weight: 900;
}

.muted{
  color: var(--muted);
  font-size: 14px;
}

.lead{
  text-align: center;
  font-size: 18px;
  margin: 0;
  opacity: 0.95;
}

.pill{
  display: inline-block;
  background: rgba(0,0,0,0.08);
  padding: 6px 10px;
  border-radius: 999px;
  margin-top: 10px;
}

.alert{
  background: rgba(0,0,0,0.08);
  padding: 10px 12px;
  border-radius: 12px;
}

/* =========================
   LISTS
   ========================= */
.list{
  list-style: none;
  padding: 0;
  margin: 0;
}

.row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.row:last-child{ border-bottom: 0; }

.grow{ flex: 1; }

.link{
  color: inherit;
  text-decoration: none;
}

.link:hover{ text-decoration: underline; }

/* =========================
   FORMS
   ========================= */
.field,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea{
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.20);
  background: rgba(255,255,255,0.65);
  outline: none;
}

textarea{ resize: vertical; }

form p{ margin: 12px 0; }

/* =========================
   BUTTONS
   ========================= */
.btn,
button.btn{
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 800;
  background: var(--green-2);
  color: #fff;
}

.btn:hover{ filter: brightness(0.98); }

.btn.secondary{
  background: rgba(0,0,0,0.08);
  color: var(--text);
}

.btn.danger{
  background: rgba(255,0,0,0.14);
  color: var(--text);
}

/* keep your old class working */
.btn-primary{ /* alias */
  background: var(--green-2);
  color: #fff;
  padding: 12px 30px;
  border-radius: 30px;
  border: none;
  font-size: 16px;
  cursor: pointer;
  font-weight: 800;
}

/* =========================
   SIGNUP PAGE (optional)
   ========================= */
.signup-box{
  max-width: 800px;
  margin: 20px auto;
  background: #f6f8d9;
  padding: 26px;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.section{
  margin-bottom: 18px;
  padding: 18px;
  background: #eef3c4;
  border-radius: 12px;
}

.section legend{
  font-weight: 900;
  padding: 0 10px;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 640px){
  .header-inner{ padding: 14px 16px; }
  .logo img{ height: 64px; }
  .midbar-inner{ font-size: 16px; padding: 0 10px; }
  .nav-list{ gap: 12px; overflow-x: auto; height: 50px; }
  .h1{ font-size: 34px; }
}

/* ===== Auth welcome in header ===== */
.user-welcome{
  font-weight: 800;
  color: #1f1f1f;
  background: rgba(255,255,255,0.35);
  padding: 10px 14px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.user-welcome a{
  color: var(--link);
  text-decoration: none;
  font-weight: 900;
}

.user-welcome a:hover{
  text-decoration: underline;
}

/* --- Game isolation --- */
.game-wrapper {
  direction: ltr;
  width: 100%;
  max-width: none;
  margin: 0 auto;
}

.game-wrapper .app {
  max-width: 1200px;
  margin: 0 auto;
}

/* Prevent RTL inheritance */
.game-wrapper * {
  direction: ltr;
  text-align: left;
}

.game-title {
  text-align: center;
  margin: 1rem 0;
}
