@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Manrope:wght@400;600;800&display=swap');

:root {
  --felt-dark: #0b3d2e;
  --felt-darker: #072920;
  --felt-light: #145c42;
  --gold: #d4af37;
  --gold-bright: #f2cf5b;
  --cream: #f4ecd8;
  --ink: #142019;
  --red: #b3452d;
  --win: #4caf7d;
  --lose: #c9584a;
  font-size: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% -10%, rgba(212,175,55,0.10), transparent 40%),
    repeating-linear-gradient(45deg, var(--felt-dark) 0, var(--felt-dark) 2px, var(--felt-darker) 2px, var(--felt-darker) 4px);
  color: var(--cream);
  font-family: 'Manrope', sans-serif;
}

h1, h2, h3, .display {
  font-family: 'Playfair Display', serif;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

a { color: var(--gold-bright); }

.wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(180deg, var(--felt-darker), rgba(7,41,32,0.6));
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--gold-bright);
  text-decoration: none;
}
.brand::before { content: "♠ "; }

.nav-links { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--cream); font-size: 0.92rem; }
.nav-links a:hover { color: var(--gold-bright); }

.wallet-pill {
  display: flex; gap: 14px; align-items: center;
  background: var(--ink);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 800;
  color: var(--gold-bright);
}

.card-panel {
  background: rgba(20, 32, 25, 0.72);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

.btn {
  display: inline-block;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--ink);
  border: none;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.1s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
}
.btn.danger { background: linear-gradient(180deg, #d3684f, var(--red)); color: #fff; }

input, select {
  background: var(--felt-darker);
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--cream);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 1rem;
  width: 100%;
}

label { font-size: 0.85rem; color: var(--gold-bright); font-weight: 700; display: block; margin-bottom: 6px; }
.field { margin-bottom: 16px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

.game-tile {
  display: block;
  text-decoration: none;
  padding: 22px;
  border-radius: 14px;
  background: linear-gradient(160deg, var(--felt-light), var(--felt-darker));
  border: 1px solid rgba(212,175,55,0.3);
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.game-tile:hover { transform: translateY(-4px); border-color: var(--gold); }
.game-tile .emoji { font-size: 2.4rem; display: block; margin-bottom: 8px; }
.game-tile .name { color: var(--cream); font-weight: 800; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid rgba(212,175,55,0.2); }
th { color: var(--gold-bright); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: rgba(212,175,55,0.05); }

.rank-1 { color: var(--gold-bright); font-weight: 900; }
.rank-2 { color: #d8d8d8; font-weight: 800; }
.rank-3 { color: #c98a4b; font-weight: 800; }

.banner {
  background: linear-gradient(90deg, rgba(212,175,55,0.18), transparent);
  border-left: 4px solid var(--gold);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 600;
}

.error-msg { color: var(--lose); font-weight: 700; margin-top: 10px; }
.success-msg { color: var(--win); font-weight: 700; margin-top: 10px; }

.slot-reels { display: flex; gap: 14px; justify-content: center; margin: 24px 0; }
.reel {
  width: 80px; height: 80px;
  background: var(--felt-darker);
  border: 2px solid var(--gold);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.6rem;
}

.card-item {
  border-radius: 10px;
  padding: 14px;
  text-align: center;
  border: 1px solid rgba(212,175,55,0.3);
  background: var(--felt-darker);
}
.card-item.locked { opacity: 0.3; filter: grayscale(1); }
.rarity-commune { border-color: #9aa0a6; }
.rarity-rare { border-color: #4c8fd1; }
.rarity-ultra_rare { border-color: #a24cd1; }
.rarity-legendaire { border-color: var(--gold-bright); box-shadow: 0 0 14px rgba(242,207,91,0.5); }

.hand { display: flex; gap: 10px; justify-content: center; margin: 20px 0; flex-wrap: wrap; }
.playing-card {
  width: 64px; height: 92px;
  background: var(--cream);
  color: var(--ink);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.3rem;
  border: 2px solid #00000020;
  cursor: pointer;
  user-select: none;
}
.playing-card.held { outline: 3px solid var(--gold-bright); transform: translateY(-8px); }
.playing-card.red-suit { color: var(--red); }

.center-form {
  max-width: 420px;
  margin: 60px auto;
}

footer { text-align: center; padding: 30px; opacity: 0.6; font-size: 0.85rem; }
