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

:root {
    --gotham-display: "Arial Black", "Segoe UI Black", "Trebuchet MS", Arial, sans-serif;
    --gotham-ui: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

body {
    font-family: var(--gotham-ui);
    background:
        radial-gradient(circle at 50% 0%, rgba(246, 195, 67, 0.22), transparent 24%),
        linear-gradient(135deg, #05070a 0%, #111923 50%, #05070a 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: rgba(10, 14, 20, 0.94);
    padding: 20px;
    border: 1px solid rgba(246, 195, 67, 0.45);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 0 40px rgba(246, 195, 67, 0.04);
    max-width: 1000px;
    width: 100%;
    color: #e8eef5;
}

.game-info {
    max-width: 600px;
    margin: 0 auto;
}

h1 {
    font-family: var(--gotham-display);
    color: #f6c343;
    margin-bottom: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0;
    font-size: clamp(2rem, 7vw, 3.8rem);
    font-weight: 900;
    text-shadow: 0 0 18px rgba(246, 195, 67, 0.25);
}

.info-panel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(246, 195, 67, 0.35);
    border-radius: 10px;
    background: rgba(9, 13, 19, 0.85);
    box-shadow: inset 0 0 30px rgba(246, 195, 67, 0.04);
}

.turn-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 90px;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(246, 195, 67, 0.12);
    border: 1px solid rgba(246, 195, 67, 0.35);
}

.turn-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #f6c343;
    opacity: 0.85;
    font-weight: 700;
}

.turn-player {
    font-family: var(--gotham-display);
    font-size: 0.95rem;
    color: #f6c343;
    font-weight: 900;
    text-shadow: 0 0 10px rgba(246, 195, 67, 0.25);
}

.turn-badge.p1-turn {
    background: rgba(0, 212, 255, 0.12);
    border-color: rgba(0, 212, 255, 0.55);
}

.turn-badge.p1-turn .turn-label,
.turn-badge.p1-turn .turn-player {
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.turn-badge.p2-turn {
    background: rgba(126, 231, 135, 0.12);
    border-color: rgba(126, 231, 135, 0.55);
}

.turn-badge.p2-turn .turn-label,
.turn-badge.p2-turn .turn-player {
    color: #7ee787;
    text-shadow: 0 0 10px rgba(126, 231, 135, 0.3);
}

.updates {
    font-family: var(--gotham-ui);
    font-weight: 700;
    color: #e8eef5;
    font-size: 0.95rem;
    min-height: 22px;
    text-align: center;
    padding: 0 6px;
}

.dice-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

#dice {
    font-family: var(--gotham-display);
    font-size: 34px;
    margin: 0;
    animation: shake 0.5s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border: 2px solid #f6c343;
    border-radius: 8px;
    color: #f6c343;
    background: #090d13;
    box-shadow: 0 0 24px rgba(246, 195, 67, 0.18);
}

.board-container {
    position: relative;
    margin: 0 auto 44px;
    width: 100%;
    max-width: 600px;
}

.board {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 2px;
    background: #05070a;
    padding: 10px;
    border: 2px solid #f6c343;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(246, 195, 67, 0.14);
}

.cell {
    aspect-ratio: 1;
    border: 1px solid #2b3642;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    position: relative;
    color: #d7dee8;
    background: linear-gradient(145deg, #141b24, #0c1118);
    font-weight: 700;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.snake {
    color: #ffb0b8;
    background: linear-gradient(145deg, #3a1119, #13090c);
    border-color: #7e2636;
}

.ladder {
    color: #ffe29b;
    background: linear-gradient(145deg, #332709, #111007);
    border-color: #8a6915;
}

.jump-label {
    display: block;
    max-width: 90%;
    padding: 1px 4px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 1.2;
    color: #080b0f;
}

.jump-label.boost {
    background: #f6c343;
}

.jump-label.trap {
    background: #ff5a72;
}

.path-overlay {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.connector {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.72;
    filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.65));
    transition: opacity 0.18s ease, stroke-width 0.18s ease;
}

.connector.boost {
    stroke: #f6c343;
}

.connector.trap {
    stroke: #ff5a72;
    stroke-dasharray: 7 5;
}

.connector.jump-active {
    opacity: 1;
    stroke-width: 6;
}

.cell.jump-active {
    transform: scale(1.08);
    box-shadow: inset 0 0 0 2px #fff, 0 0 18px rgba(246, 195, 67, 0.55);
    z-index: 2;
}

.players {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.player {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    transition: all 0.5s ease;
    border: 2px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}

.player.moving {
    transform: scale(1.12);
}

.player.jumping {
    transform: scale(1.24);
    box-shadow: 0 0 22px rgba(246, 195, 67, 0.7);
}

.player1 {
    background-color: #0a1628;
    color: #00d4ff;
    border-color: #00d4ff;
    z-index: 3;
}

.player2 {
    background-color: #0a1f14;
    color: #7ee787;
    border-color: #7ee787;
    z-index: 1;
}

button {
    font-family: var(--gotham-ui);
    padding: 9px 16px;
    border: 1px solid rgba(246, 195, 67, 0.65);
    border-radius: 6px;
    background-color: #f6c343;
    color: #080b0f;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.2s, box-shadow 0.2s;
}

button:hover {
    background-color: #ffd86e;
    box-shadow: 0 0 18px rgba(246, 195, 67, 0.25);
    transform: translateY(-1px);
}

button:disabled {
    background-color: #39424d;
    color: #8e98a4;
    border-color: #39424d;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.game-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.mode-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8eef5;
    font-weight: 700;
}

.mode-control select {
    font-family: var(--gotham-ui);
    height: 34px;
    border: 1px solid rgba(246, 195, 67, 0.65);
    border-radius: 6px;
    background: #090d13;
    color: #f6c343;
    font-weight: 700;
    padding: 0 10px;
}



.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.72);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #0c1118;
    padding: 18px;
    border: 1px solid rgba(246, 195, 67, 0.5);
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    color: #e8eef5;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.65);
}

.modal-content h2 {
    font-family: var(--gotham-display);
    color: #f6c343;
    margin-bottom: 10px;
}

.modal-content ul {
    margin: 0 0 18px 18px;
}

.modal-content li {
    margin: 8px 0;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    body {
        align-items: flex-start;
        padding: 8px;
    }

    h1 {
        margin-bottom: 8px;
    }

    .board-container {
        margin-bottom: 36px;
    }

    .info-panel {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
        padding: 10px 12px;
    }

    .turn-badge {
        min-width: 72px;
        padding: 6px 8px;
    }

    .turn-player {
        font-size: 0.82rem;
    }

    .updates {
        font-size: 0.85rem;
    }

    .cell {
        font-size: 10px;
    }

    .cell.snake,
    .cell.ladder {
        font-size: 9px;
    }

    .player {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }

    .game-controls {
        gap: 10px;
    }
}
