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

:root {
    --left-color: #e74c3c;
    --right-color: #3498db;
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --text-light: #eee;
    --text-dim: #666;
    --rope-color: #c9a050;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse at 20% 20%, rgba(231,76,60,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(52,152,219,0.08) 0%, transparent 50%);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.game-wrapper {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header {
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--left-color), #fff, var(--right-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.game-card {
    background: var(--bg-card);
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.stats-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-box {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255,255,255,0.03);
}

.stat-box.wins {
    flex-direction: row;
    justify-content: space-around;
}

.team-stats {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.team-stats.left { color: var(--left-color); }
.team-stats.right { color: var(--right-color); }

.team-stats[data-team="left"] {
    border-color: var(--left-color);
    background: rgba(231,76,60,0.15);
    box-shadow: 0 0 20px rgba(231,76,60,0.2);
}

.team-stats[data-team="right"] {
    border-color: var(--right-color);
    background: rgba(52,152,219,0.15);
    box-shadow: 0 0 20px rgba(52,152,219,0.2);
}

.team-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 10px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    white-space: nowrap;
}

.team-stats.left .team-badge {
    background: var(--left-color);
    color: white;
}

.team-stats.right .team-badge {
    background: var(--right-color);
    color: white;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-dim);
}

.stat-divider {
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent);
    margin: 0 1rem;
}

.battle-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 2rem 0;
}

.side-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
}

.side-indicator .team-name {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.side-indicator.left .team-name { color: var(--left-color); }
.side-indicator.right .team-name { color: var(--right-color); }

.side-indicator .click-count {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
}

.side-indicator.left .click-count { color: var(--left-color); }
.side-indicator.right .click-count { color: var(--right-color); }

.side-indicator .player-count {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.side-indicator .player-count span {
    color: #fff;
    font-weight: 600;
}

.rope-section {
    flex: 1;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rope-track-wrapper {
    position: relative;
    padding: 0.5rem 0;
}

.rope-track {
    height: 40px;
    background: linear-gradient(90deg, 
        rgba(231,76,60,0.4) 0%, 
        rgba(231,76,60,0.15) 20%, 
        rgba(255,255,255,0.05) 45%,
        rgba(255,255,255,0.05) 55%,
        rgba(52,152,219,0.15) 80%,
        rgba(52,152,219,0.4) 100%
    );
    border-radius: 20px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.3);
}

.rope-track-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        rgba(231,76,60,0.2) 0%, 
        rgba(52,152,219,0.2) 100%
    );
    border-radius: 20px;
}

.team-zone {
    position: absolute;
    top: 0;
    height: 100%;
}

.left-zone {
    left: 0;
    width: 20%;
    background: linear-gradient(90deg, rgba(231,76,60,0.3), transparent);
    border-radius: 20px 0 0 20px;
}

.right-zone {
    right: 0;
    width: 20%;
    background: linear-gradient(-90deg, rgba(52,152,219,0.3), transparent);
    border-radius: 0 20px 20px 0;
}

.center-line {
    position: absolute;
    left: 50%;
    top: -20px;
    bottom: -20px;
    width: 2px;
    background: rgba(255,255,255,0.3);
    transform: translateX(-50%);
    border-radius: 1px;
}

.rope {
    position: absolute;
    top: 50%;
    width: 60px;
    height: 50px;
    background: linear-gradient(180deg, 
        #d4af37 0%, 
        var(--rope-color) 20%, 
        #8b7355 80%, 
        #c9a050 100%
    );
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 
        0 4px 15px rgba(0,0,0,0.5),
        0 0 30px rgba(201,160,80,0.3),
        inset 0 2px 4px rgba(255,255,255,0.3);
    transition: left 0.15s ease-out;
    z-index: 10;
}

.rope::before,
.rope::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, #666, #222);
    border-radius: 50%;
    transform: translateY(-50%);
    border: 2px solid #444;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}

.rope::before { left: -10px; }
.rope::after { right: -10px; }

.rope-markers {
    display: flex;
    justify-content: space-between;
    padding: 0 30px;
    font-size: 0.7rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
}

.rope-marker-left { color: var(--left-color); }
.rope-marker-right { color: var(--right-color); }

.bottom-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.total-stats {
    display: flex;
    gap: 3rem;
}

.total-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.total-stat .value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
}

.total-stat .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dim);
}

.team-indicator {
    text-align: center;
    min-width: 200px;
}

.team-indicator .player-team {
    font-size: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(0,0,0,0.3);
    border: 2px solid transparent;
}

.team-indicator .player-team strong {
    font-weight: 700;
}

.team-indicator .player-team[data-player-team="left"] {
    color: var(--left-color);
    border-color: var(--left-color);
    background: rgba(231,76,60,0.1);
}

.team-indicator .player-team[data-player-team="right"] {
    color: var(--right-color);
    border-color: var(--right-color);
    background: rgba(52,152,219,0.1);
}

.click-button {
    padding: 2rem 5rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(180deg, #444 0%, #2a2a2a 50%, #1a1a1a 100%);
    border: 3px solid #555;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 
        0 8px 0 #111,
        0 12px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.click-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

.click-button:hover::before {
    left: 100%;
}

.click-button:hover {
    transform: translateY(3px);
    box-shadow: 
        0 5px 0 #111,
        0 8px 20px rgba(0,0,0,0.5);
}

.click-button:active,
.click-button.active {
    transform: translateY(6px);
    box-shadow: 
        0 2px 0 #111,
        0 4px 10px rgba(0,0,0,0.5);
}

.btn-hint {
    display: block;
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
    color: #666;
}

.left-winner .rope,
.right-winner .rope {
    animation: pulse-glow 0.5s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    from { box-shadow: 0 4px 15px rgba(0,0,0,0.5), 0 0 30px rgba(201,160,80,0.3); }
    to { box-shadow: 0 4px 15px rgba(0,0,0,0.5), 0 0 50px rgba(201,160,80,0.6); }
}

.left-winner .rope {
    background: linear-gradient(180deg, 
        #c0392b 0%, 
        var(--left-color) 20%, 
        #922B21 80%, 
        #e74c3c 100%
    );
}

.right-winner .rope {
    background: linear-gradient(180deg, 
        #2980b9 0%, 
        var(--right-color) 20%, 
        #1F618D 80%, 
        #3498db 100%
    );
}
