:root {
    --bg-color: #1a2a1a;
    --accent-gold: #ffdf00;
    --accent-blue: #00e5ff;
    --text-color: #ffffff;
    --panel-bg: rgba(0, 0, 0, 0.6);
}

body {
    background-color: var(--bg-color);
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
}

#game-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #1a2a1a;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* UI Elements */
#ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.scoreboard-compact {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.85);
    padding: 8px 18px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-label {
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 1px;
    opacity: 0.9;
}

.player .team-label { color: #00e5ff; }
.ai .team-label { color: #f43f5e; }

.stats {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.08);
    padding: 2px 12px;
    border-radius: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.stat-item .label {
    font-size: 0.55rem;
    font-weight: 700;
    color: #aaa;
    margin-bottom: 2px;
}

.stat-item .val {
    font-size: 0.9rem;
    font-weight: 900;
    color: #fff;
}

.score-val {
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    min-width: 35px;
    text-align: center;
    border-left: 1px solid rgba(255,255,255,0.15);
    margin-left: 5px;
    padding-left: 8px;
}

.ai .score-val {
    border-left: none;
    border-right: 1px solid rgba(255,255,255,0.15);
    margin-left: 0;
    margin-right: 5px;
    padding-left: 0;
    padding-right: 8px;
}

.match-format {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.match-format .vs {
    font-style: italic;
    font-weight: 900;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.3);
}

.format-tag {
    font-size: 0.55rem;
    font-weight: 900;
    background: #FFD700;
    color: #000;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.set-progress {
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.set-progress .total {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.4);
    font-weight: 700;
}

.turn-indicator {
    position: absolute;
    top: 68px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #00e5ff;
    color: #00e5ff;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
    transition: all 0.3s;
    letter-spacing: 1px;
    white-space: nowrap;
    z-index: 15;
    backdrop-filter: blur(5px);
}

.turn-indicator.ai {
    border-color: #f43f5e;
    color: #f43f5e;
    text-shadow: 0 0 8px rgba(244, 63, 94, 0.6);
}

/* Overlays */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 20;
    text-align: center;
    backdrop-filter: blur(10px);
}

.overlay-box {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.8), rgba(17, 24, 39, 0.9));
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    max-width: 90%;
    width: 400px;
}

.pmg-btn {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    background: linear-gradient(135deg, #00e5ff, #0088cc);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0, 229, 255, 0.4);
    pointer-events: auto;
    transition: transform 0.2s;
}

.pmg-btn:hover {
    transform: scale(1.05);
}

.instructions-box {
    margin-top: 25px;
    text-align: left;
    background: rgba(0, 0, 0, 0.35);
    padding: 20px;
    border-radius: 15px;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.instructions-box p {
    margin: 8px 0;
    color: #eee;
}

.instructions-box strong {
    color: var(--accent-blue);
}

/* Game Info Section */
.game-info {
    background: #0a0f0a;
    padding: 60px 20px;
    color: #ccc;
    font-family: 'Inter', sans-serif;
}

.info-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
}

.info-card h2 {
    color: #fff;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 25px;
    border-left: 4px solid var(--accent-blue);
    padding-left: 15px;
}

.info-content p {
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.info-content ul {
    list-style: none;
    padding: 0;
}

.info-content li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.05rem;
    line-height: 1.6;
}

.info-content li::before {
    content: '🎾';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
}

.faq-item {
    margin-bottom: 30px;
}

.faq-item h4 {
    color: var(--accent-blue);
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.faq-item p {
    font-size: 1rem;
    color: #aaa;
}

@media (max-width: 768px) {
    .info-card {
        padding: 25px;
    }
    
    .info-card h2 {
        font-size: 1.6rem;
    }
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .scoreboard {
        gap: 20px;
        padding: 8px 20px;
    }
    .score-value {
        font-size: 1.8rem;
    }
}
