  :root {
      --primary: #6366f1;
      --primary-dark: #4f46e5;
      --primary-light: #c7d2fe;
      --secondary: #f97316;
      --success: #22c55e;
      --danger: #ef4444;
      --warning: #f59e0b;
      --info: #3b82f6;
      --light: #f8fafc;
      --dark: #1e293b;
      --gray: #64748b;
      --radius: 16px;
      --radius-sm: 8px;
      --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
      --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.15);
      --transition: all 0.3s ease;
      --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .game-over {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.9);
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 9999;
      animation: fadeIn 1s ease;
  }

  .hidden {
      display: none;
  }

  .game-over-content {
      text-align: center;
      animation: popIn 0.6s ease;
  }

  .game-over-content h1 {
      font-size: 3.5em;
      color: #fff;
      text-shadow: 0 0 20px #ffcc00, 0 0 40px #ff6600;
  }

  /* Animáció */
  @keyframes fadeIn {
      from {
          opacity: 0;
      }

      to {
          opacity: 1;
      }
  }

  @keyframes popIn {
      0% {
          transform: scale(0.7);
          opacity: 0;
      }

      100% {
          transform: scale(1);
          opacity: 1;
      }
  }

  * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
  }

  body {

      user-select: none;
      /* Megakadályozza a kijelölést */
      -webkit-user-select: none;
      /* Safari támogatás */
      -moz-user-select: none;
      /* Firefox támogatás */
      -ms-user-select: none;
      /* IE/Edge támogatás */

      font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
      padding: 16px;
      margin: 0;
      background: linear-gradient(135deg, #f0f4ff 0%, #e6e6ff 100%);
      color: var(--dark);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      line-height: 1.6;
  }

  .game-container {
      width: 100%;
      max-width: 600px;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      padding: 24px;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      margin-bottom: 20px;
      animation: fadeIn 0.6s ease-out;
  }

  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(20px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  .join-section {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 12px;
      margin-bottom: 20px;
      background: var(--light);
      padding: 16px;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
  }

  input[type="text"] {
      padding: 14px 16px;
      font-size: 16px;
      border: 2px solid #e2e8f0;
      border-radius: var(--radius-sm);
      outline: none;
      transition: var(--transition);
      background: white;
      flex-grow: 1;
      min-width: 180px;
  }

  input[type="text"]:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  }

  button {
      padding: 14px 24px;
      font-size: 16px;
      font-weight: 600;
      border: none;
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: var(--transition);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
  }

  #joinBtn {
      background-color: var(--primary);
      color: white;
      box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
  }

  #joinBtn:hover:not(:disabled) {
      background-color: var(--primary-dark);
      transform: translateY(-2px);
      box-shadow: 0 6px 12px rgba(99, 102, 241, 0.4);
  }

  button:disabled {
      background-color: #cbd5e1;
      cursor: not-allowed;
      color: #64748b;
      box-shadow: none;
      transform: none;
  }

  #players {
      margin: 16px 0;
      display: flex;
      flex-direction: column;
      gap: 12px;
  }

  #players>div {
      font-weight: 600;
      padding: 16px;
      color: var(--dark);
      background-color: white;
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow);
      transition: var(--transition);
      display: flex;
      align-items: center;
      gap: 12px;
      animation: slideIn 0.4s ease-out;
  }

  @keyframes slideIn {
      from {
          opacity: 0;
          transform: translateX(-20px);
      }

      to {
          opacity: 1;
          transform: translateX(0);
      }
  }

  #players>div::before {
      content: "";
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: var(--primary-light);
      display: inline-block;
  }

  #players>div.current-player {
      background-color: var(--primary);
      color: white;
      box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
      transform: scale(1.02);
  }

  #players>div.current-player::before {
      background: white;
      box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  }

  #board-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-top: 20px;
      width: 100%;
  }

  #moveBtns {
      display: flex;
      gap: 12px;
      margin: 16px 0;
      flex-wrap: wrap;
      justify-content: center;
      width: 100%;
  }

  #moveBtns button {
      background-color: var(--info);
      color: white;
      box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
      flex: 1;
      min-width: 100px;
      max-width: 120px;
  }

  #moveBtns button:hover {
      background-color: #2563eb;
      transform: translateY(-2px);
  }

  #currentPlayer {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--primary);
      margin: 16px 0;
      padding: 16px;
      text-align: center;
      background: var(--light);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      width: 100%;
      animation: pulse 2s infinite;
  }

  @keyframes pulse {
      0% {
          box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
      }

      70% {
          box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
      }

      100% {
          box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
      }
  }

  .dice-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
      width: 100%;
  }

  .dice {

      user-select: none;
      /* Megakadályozza a kijelölést */
      -webkit-user-select: none;
      /* Safari támogatás */
      -moz-user-select: none;
      /* Firefox támogatás */
      -ms-user-select: none;
      /* IE/Edge támogatás */


      width: 80px;
      height: 80px;
      font-size: 42px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      background: white;
      border-radius: 16px;
      box-shadow: var(--shadow-md);
      transition: var(--transition);
      animation: bounce 1s ease;
  }

  @keyframes bounce {

      0%,
      20%,
      50%,
      80%,
      100% {
          transform: translateY(0);
      }

      40% {
          transform: translateY(-20px);
      }

      60% {
          transform: translateY(-10px);
      }
  }

  .dice:hover {
      transform: rotate(10deg) scale(1.1);
      box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
  }

  .dice.rolling {
      animation: rollDice 0.8s ease-out;
  }

  @keyframes rollDice {
      0% {
          transform: rotate(0) scale(1);
      }

      50% {
          transform: rotate(180deg) scale(1.2);
      }

      100% {
          transform: rotate(360deg) scale(1);
      }
  }

  #board {
      display: grid;
      grid-template-columns: repeat(13, 1fr);
      grid-template-rows: repeat(13, 1fr);
      width: 100%;
      aspect-ratio: 1/1;
      margin: 20px 0;
      border-radius: var(--radius-sm);
      overflow: hidden;
      box-shadow: var(--shadow);
      animation: scaleIn 0.5s ease-out;
  }

  @keyframes scaleIn {
      from {
          opacity: 0;
          transform: scale(0.9);
      }

      to {
          opacity: 1;
          transform: scale(1);
      }
  }

  .cell {
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 12px;
      position: relative;
      user-select: none;
      transition: var(--transition);
  }

  .cell:hover {
      filter: brightness(1.1);
      transform: scale(1.05);
      z-index: 2;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }

  .center {
      background: #f1f5f9;
  }

  .base-red {
      background: #fee2e2;
  }

  .base-blue {
      background: #dbeafe;
  }

  .base-green {
      background: #dcfce7;
  }

  .base-yellow {
      background: #fef3c7;
  }

  .center {
      background: #475569;
  }

  .path-red {
      background: #ef4444;
  }

  .path-blue {
      background: #3b82f6;
  }

  .path-green {
      background: #22c55e;
  }

  .path-yellow {
      background: #f59e0b;
  }

  .path-white {
      background: #f8fafc;
  }

  .pawn {
      position: absolute;
      width: 60%;
      height: 60%;
      border-radius: 50%;
      transition: var(--transition-slow);
      border: 2px solid white;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
      z-index: 5;
      animation: float 3s ease-in-out infinite;
  }

  @keyframes float {
      0% {
          transform: translateY(0px);
      }

      50% {
          transform: translateY(-5px);
      }

      100% {
          transform: translateY(0px);
      }
  }

  /* Mobil nézet - itt történt a fő módosítás */
  @media (max-width: 768px) {
      body {
          padding: 12px;
      }

      .game-container {
          padding: 20px;
          border-radius: var(--radius-sm);
          max-width: 100%;
      }

      .join-section {
          flex-direction: column;
          align-items: stretch;
      }

      input[type="text"] {
          min-width: 100%;
      }

      button {
          padding: 12px 20px;
          font-size: 15px;
      }

      #moveBtns {
          flex-direction: column;
          align-items: center;
      }

      #moveBtns button {
          max-width: 100%;
          width: 100%;
      }

      #currentPlayer {
          font-size: 1.3rem;
          padding: 14px;
      }

      .dice {
          width: 70px;
          height: 70px;
          font-size: 36px;
      }

      #board {
          margin: 16px 0;
          width: 100%;
          /* Ez biztosítja, hogy a tábla kitölti a szélességet */
          max-width: 100%;
          /* Eltávolítjuk a maximális szélesség korlátot */
      }

      .cell {
          font-size: 10px;
      }
  }

  @media (max-width: 480px) {
      .game-container {
          padding: 16px;
      }

      #players>div {
          padding: 14px;
      }

      #currentPlayer {
          font-size: 1.2rem;
      }

      .dice {
          width: 60px;
          height: 60px;
          font-size: 32px;
      }

      .cell {
          font-size: 9px;
      }

      /* Extra kis kijelzők optimalizálása */
      #board {
          aspect-ratio: 1/1;
          /* Megtartjuk a négyzet alakot */
      }
  }

  /* Sötét téma támogatás */
  @media (prefers-color-scheme: dark) {
      :root {
          --light: #1e293b;
          --dark: #f8fafc;
      }

      body {
          background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
          color: var(--dark);
      }

      .game-container {
          background: rgba(30, 41, 59, 0.95);
      }

      input[type="text"] {
          background: #334155;
          color: white;
          border-color: #475569;
      }

      #players>div {
          background: #334155;
          color: white;
      }

      .dice {
          background: #334155;
          color: white;
      }

      .path-white {
          background: #475569;
      }


  }