* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  background: radial-gradient(circle at top, #1a1a2e, #050510);
  font-family: Inter, system-ui, -apple-system, Arial, sans-serif;
  color: #fff;
  overflow: hidden;
}

.hidden {
  display: none;
}

/* ================= BACKGROUND ================= */

.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(120,80,255,0.18), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(80,180,255,0.15), transparent 50%);
  pointer-events: none;
}

/* ================= CARD ================= */

.card {
  max-width: 1000px;
  width: 95%;
  margin: 40px auto;
  padding: 28px;
  border-radius: 26px;
  background: rgba(18, 18, 35, 0.65);
  backdrop-filter: blur(22px);
  box-shadow: 0 35px 90px rgba(0,0,0,0.6);
}

/* ================= LAYOUT ================= */

.game-layout {
  display: grid;
  grid-template-columns: 240px auto 240px;
  gap: 28px;
  align-items: center;
}

.center {
  text-align: center;
}

/* ================= PLAYERS ================= */

.players {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.player {
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  opacity: 0.35;
  transition: 0.3s;
}

.player.active {
  opacity: 1;
  box-shadow: 0 0 22px currentColor;
}

.player-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.player-name {
  font-weight: 600;
  font-size: 15px;
}

.player-wins {
  font-size: 13px;
  opacity: 0.8;
}

/* ================= INVENTORY ================= */

.sizes {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}

.size-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  cursor: pointer;
}

.size-wrap.selected .size {
  box-shadow: 0 0 16px currentColor;
  transform: scale(1.1);
}

.size {
  border-radius: 50%;
  border: 2px solid currentColor;
  transition: 0.25s;
}

.size.large { width: 38px; height: 38px; }
.size.medium { width: 26px; height: 26px; }
.size.small { width: 16px; height: 16px; }

.size.disabled {
  opacity: 0.2;
  pointer-events: none;
}

/* ================= COLORS ================= */

.player[data-color="blue"],
.piece.blue { color: #4da3ff; }

.player[data-color="yellow"],
.piece.yellow { color: #ffd84d; }

.player[data-color="red"],
.piece.red { color: #ff5c5c; }

.player[data-color="green"],
.piece.green { color: #3ddc84; }

/* ================= ROUND / TURN ================= */

#roundInfo {
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 4px;
}

#turnInfo {
  font-size: 15px;
  margin-bottom: 14px;
}

/* ================= BOARD ================= */

#board {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  gap: 14px;
  justify-content: center;
}

.cell {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
  position: relative;
}

/* ================= STACK ================= */

.stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.piece {
  position: absolute;
  border-radius: 50%;
  border: 3px solid currentColor;
  inset: 50%;
  transform: translate(-50%, -50%);
}

/* STACK SIZES */
.piece.small {
  width: 22px;
  height: 22px;
}

.piece.medium {
  width: 44px;
  height: 44px;
}

.piece.large {
  width: 68px;
  height: 68px;
}

/* NEON GLOW */
.piece {
  box-shadow:
    0 0 12px currentColor,
    inset 0 0 8px rgba(255,255,255,0.25);
}

/* ================= MOBILE ================= */

@media (max-width: 900px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  .players {
    flex-direction: row;
    justify-content: space-between;
  }
}
/* ================= LANDING FINAL FIX (VERTICAL) ================= */

#landing.card {
  max-width: 460px;
  margin: auto;
  margin-top: 12vh;
  padding: 40px 36px;
  text-align: center;

  background: rgba(35, 30, 60, 0.85);
  backdrop-filter: blur(30px);
  border-radius: 28px;

  box-shadow:
    0 0 40px rgba(140,80,255,0.45),
    0 0 120px rgba(80,140,255,0.25);
}

/* RESET INLINE BEHAVIOR */
#landing input,
#landing button {
  display: block;
  width: 100%;
}

/* INPUTI – KAO NA DRUGOJ SLICI */
#landing .input {
  height: 56px;
  padding: 0 18px;
  margin-bottom: 18px;

  border-radius: 18px;
  background: rgba(120,100,180,0.18);
  border: 1px solid rgba(160,140,255,0.35);

  color: #fff;
  font-size: 15px;
}

#landing .input::placeholder {
  color: rgba(220,210,255,0.7);
}

#landing .input:focus {
  outline: none;
  border-color: #a99cff;
  box-shadow: 0 0 14px rgba(160,140,255,0.6);
}

/* PLAY – ISPOD ROOM CODE, VELIKO */
#landing .primary-btn {
  height: 64px;
  margin-top: 6px;
  margin-bottom: 12px;

  border-radius: 20px;
  font-size: 22px;
  font-weight: 600;

  background: linear-gradient(135deg, #7b5cff, #9f8cff);

  box-shadow:
    0 0 25px rgba(140,80,255,0.8),
    0 0 60px rgba(140,80,255,0.45);

  transition: 0.25s;
}

#landing .primary-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 35px rgba(160,140,255,1),
    0 0 90px rgba(140,80,255,0.7);
}

/* CREATE PRIVATE – MANJI PLAY */
#landing .actions {
  margin-top: 6px;
}

#landing .actions button {
  height: 44px;
  border-radius: 14px;

  background: rgba(120,100,180,0.18);
  border: 1px solid rgba(160,140,255,0.35);

  color: #eae6ff;
  font-size: 14px;
}

/* HOME JE ČIST – NEMA GAME UI */
#landing:not(.hidden) ~ #lobby,
#landing:not(.hidden) ~ #game {
  display: none !important;
}
