body {
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 200, 120, 0.24), transparent 40%),
        radial-gradient(circle at 84% 78%, rgba(26, 137, 180, 0.20), transparent 38%),
        linear-gradient(140deg, #fcfff5, #edf6f7);
    margin: 0;
    color: #2f3f4a;
    line-height: 1.6;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

#game-section {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 2.2rem;
    margin-bottom: 3rem;
}

.cc-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.cc-board-wrap {
    width: min(90vw, 80vh, 720px);
    height: min(90vw, 80vh, 720px);
    min-height: 280px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.6), transparent 36%),
        linear-gradient(145deg, #f7dca9, #dfb57a);
    border: 8px solid #9e6b38;
    box-shadow: inset 0 0 18px rgba(80, 50, 20, 0.20), 0 14px 24px rgba(46, 27, 9, 0.2);
    padding: 1.25rem;
}

.cc-board {
    position: relative;
    width: 100%;
    height: 100%;
}

.cc-hole {
    position: absolute;
    width: clamp(18px, 2.2vw, 32px);
    height: clamp(18px, 2.2vw, 32px);
    aspect-ratio: 1 / 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(98, 64, 28, 0.7);
    background: rgba(123, 88, 48, 0.26);
    cursor: pointer;
    touch-action: manipulation;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.cc-hole:hover {
    background: rgba(255, 255, 255, 0.26);
}

.cc-hole.is-selected {
    box-shadow: 0 0 0 3px rgba(18, 74, 122, 0.45);
}

.cc-hole.is-destination {
    box-shadow: 0 0 0 3px rgba(18, 122, 55, 0.45);
    background: rgba(50, 180, 95, 0.28);
}

.cc-piece {
    width: 84%;
    height: 84%;
    aspect-ratio: 1 / 1;
    display: block;
    border-radius: 50%;
    box-shadow: inset 0 -4px 6px rgba(0, 0, 0, 0.22), 0 4px 8px rgba(0, 0, 0, 0.22);
}

.cc-piece.blue { background: radial-gradient(circle at 35% 30%, #9ac6ff, #2563eb 72%); border: 2px solid #1640a8; }
.cc-piece.red { background: radial-gradient(circle at 35% 30%, #ffaca6, #dc2626 72%); border: 2px solid #9f1d1d; }
.cc-piece.yellow { background: radial-gradient(circle at 35% 30%, #ffe88c, #ca8a04 72%); border: 2px solid #8d6202; }
.cc-piece.green { background: radial-gradient(circle at 35% 30%, #a6eac4, #16a34a 72%); border: 2px solid #0f6b30; }
.cc-piece.purple { background: radial-gradient(circle at 35% 30%, #d9bcff, #7c3aed 72%); border: 2px solid #5521b5; }
.cc-piece.orange { background: radial-gradient(circle at 35% 30%, #ffd3a8, #ea580c 72%); border: 2px solid #9a3b0b; }

.cc-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.cc-message {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2f3f4a;
    text-align: center;
}

.cc-btn {
    border: none;
    background: linear-gradient(135deg, #1d7874, #0d3b66);
    color: #ffffff;
    padding: 0.58rem 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(13, 59, 102, 0.24);
}

.players-panel {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.8rem;
}

.player-chip {
    border: 1px solid #d6e3ea;
    border-radius: 12px;
    background: rgba(248, 251, 252, 0.72);
    backdrop-filter: blur(2px);
    padding: 0.7rem 0.9rem;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.player-chip.player-blue {
    background: rgba(37, 99, 235, 0.14);
    border-color: rgba(22, 64, 168, 0.28);
}

.player-chip.player-red {
    background: rgba(220, 38, 38, 0.13);
    border-color: rgba(159, 29, 29, 0.28);
}

.player-chip.player-yellow {
    background: rgba(202, 138, 4, 0.16);
    border-color: rgba(141, 98, 2, 0.28);
}

.player-chip.player-green {
    background: rgba(22, 163, 74, 0.13);
    border-color: rgba(15, 107, 48, 0.28);
}

.player-chip.player-purple {
    background: rgba(124, 58, 237, 0.14);
    border-color: rgba(85, 33, 181, 0.28);
}

.player-chip.player-orange {
    background: rgba(234, 88, 12, 0.14);
    border-color: rgba(154, 59, 11, 0.28);
}

.player-chip .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.player-chip.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.62), 0 0 0 4px rgba(17, 72, 121, 0.28);
}

.player-chip.finished {
    opacity: 0.72;
}

.dot.blue { background: #2563eb; }
.dot.red { background: #dc2626; }
.dot.yellow { background: #ca8a04; }
.dot.green { background: #16a34a; }
.dot.purple { background: #7c3aed; }
.dot.orange { background: #ea580c; }

.internal-nav {
    text-align: center;
    margin-bottom: 3rem;
}

.internal-nav h3 {
    font-size: 2.2rem;
    font-weight: 600;
    color: #003366;
    margin-top: 0;
    margin-bottom: 2rem;
}

.game-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.game-btn {
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    color: #343a40;
    text-decoration: none;
}

.game-btn:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.game-btn img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.game-btn span {
    font-size: 1.25rem;
    font-weight: 600;
}

.info-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-section-centered {
    display: block;
}

.info-card.full-width {
    grid-column: 1 / -1;
}

.info-card h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #003366;
    margin-top: 0;
    margin-bottom: 1.3rem;
}

.info-card h4 {
    font-size: 1.3rem;
    color: #005f9e;
    margin-bottom: 0.5rem;
}

.info-card p,
.info-card li {
    color: #343a40;
}

.info-card ul {
    padding-left: 20px;
}

@media (max-width: 992px) {
    .info-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    main {
        padding: 2rem 1rem;
    }

    #game-section,
    .info-section {
        padding: 1.4rem;
    }

    .cc-board-wrap {
        width: min(92vw, 72vh, 620px);
        height: min(92vw, 72vh, 620px);
        padding: 0.95rem;
        border-width: 7px;
    }
}

@media (orientation: portrait) and (max-width: 480px) {
    .cc-board-wrap {
        width: min(92vw, 70vh, 450px);
        height: min(92vw, 70vh, 450px);
        min-height: 240px;
    }

    .difficulty-controls {
        justify-content: center;
    }

    .cc-btn {
        width: 100%;
        max-width: 220px;
    }
}

@media (orientation: landscape) and (max-height: 520px) {
    #game-section {
        padding: 1rem;
    }

    .cc-board-wrap {
        width: min(88vw, 72vh, 440px);
        height: min(88vw, 72vh, 440px);
        padding: 0.8rem;
    }

    .cc-hole {
        width: clamp(14px, 2.3vh, 24px);
        height: clamp(14px, 2.3vh, 24px);
    }
}
