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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 25%, #fecfef 75%, #ffecd2 100%);
    height: 100vh;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 199, 255, 0.3) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.game-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
    z-index: 1;
}

.player-side {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: flex 0.3s ease;
}

.red-side {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff3838 50%, #ee5a24 100%);
    justify-content: flex-end;
    flex: 1;
    position: relative;
    box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.1);
}

.red-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.blue-side {
    background: linear-gradient(135deg, #4834d4 0%, #3742fa 50%, #2f27ce 100%);
    justify-content: flex-start;
    flex: 1;
    position: relative;
    box-shadow: inset 0 0 50px rgba(255, 255, 255, 0.1);
}

.blue-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.player-info {
    padding: 30px;
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.player-info h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    letter-spacing: 1px;
}

.score {
    font-size: 36px;
    font-weight: 800;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 15px 25px;
    display: inline-block;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255,255,255,0.2);
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.score:hover {
    transform: scale(1.05);
    box-shadow: 
        0 12px 40px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.tap-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
}

.tap-area:active {
    transform: scale(0.98);
}

.tap-indicator {
    font-size: 32px;
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    margin: 30px 0;
    animation: pulse 2s infinite;
    letter-spacing: 2px;
    background: rgba(255,255,255,0.1);
    padding: 15px 30px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.game-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    background: rgba(255,255,255,0.08);
    padding: 40px;
    border-radius: 30px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.15),
        0 8px 32px rgba(0,0,0,0.1),
        inset 0 1px 0 rgba(255,255,255,0.3);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.game-info h1 {
    font-size: 36px;
    font-weight: 800;
    color: white;
    margin-bottom: 15px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    letter-spacing: 3px;
}

.world-app-status {
    margin-bottom: 20px;
}

.world-app-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.world-app-indicator.connected {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.3);
}

.world-app-indicator.error {
    background: rgba(244, 67, 54, 0.2);
    border-color: rgba(244, 67, 54, 0.3);
}

.world-app-indicator.info {
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(96, 165, 250, 0.3);
}

#worldAppIcon {
    font-size: 20px;
    animation: pulse 2s infinite;
}

#worldAppText {
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.game-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.btn {
    padding: 18px 35px;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 32px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
}

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

.btn:hover::before {
    left: 100%;
}

.start-btn {
    background: rgba(0, 210, 255, 0.2);
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.reset-btn {
    background: rgba(255, 183, 159, 0.2);
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.verify-btn {
    background: rgba(76, 175, 80, 0.2);
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0,0,0,0.3);
}

.btn:active {
    transform: translateY(0);
}

.countdown {
    font-size: 64px;
    font-weight: 900;
    color: white;
    margin-top: 25px;
    text-shadow: 
        0 0 20px rgba(255,255,255,0.5),
        0 2px 20px rgba(0,0,0,0.3);
    animation: countdownPulse 1s ease-in-out infinite;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.winner-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.winner-modal.show {
    display: flex;
    animation: modalFadeIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalFadeIn {
    0% { 
        opacity: 0; 
        transform: scale(0.8) translateY(20px);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0);
    }
}

.winner-content {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(40px);
    padding: 50px 40px;
    border-radius: 30px;
    text-align: center;
    box-shadow: 
        0 30px 80px rgba(0,0,0,0.2),
        0 15px 50px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.3),
        inset 0 -1px 0 rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    max-width: 90%;
    position: relative;
    overflow: hidden;
}

.winner-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.winner-animation {
    position: relative;
    margin-bottom: 30px;
}

.trophy {
    font-size: 100px;
    animation: trophyFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.3));
}

@keyframes trophyFloat {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
    }
    25% { 
        transform: translateY(-10px) rotate(2deg);
    }
    50% { 
        transform: translateY(-5px) rotate(0deg);
    }
    75% { 
        transform: translateY(-15px) rotate(-2deg);
    }
}

.confetti {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #ff6b6b, #ff3838);
    border-radius: 2px;
    animation: confetti 4s infinite;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.confetti::before,
.confetti::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    animation: confetti 4s infinite;
    box-shadow: 0 0 10px rgba(72, 52, 212, 0.5);
}

.confetti::before {
    left: -30px;
    background: linear-gradient(45deg, #4834d4, #3742fa);
    animation-delay: 0.7s;
}

.confetti::after {
    right: -30px;
    left: auto;
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
    animation-delay: 1.4s;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

@keyframes confetti {
    0% { 
        transform: translateY(0) rotate(0deg) scale(1); 
        opacity: 1; 
    }
    50% {
        transform: translateY(100px) rotate(180deg) scale(0.8);
        opacity: 0.8;
    }
    100% { 
        transform: translateY(250px) rotate(720deg) scale(0.3); 
        opacity: 0; 
    }
}

.winner-text {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 35px;
    color: white;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

.play-again-btn {
    background: rgba(0, 210, 255, 0.2);
    color: white;
    padding: 20px 45px;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.game-active .game-status {
    display: none;
}

.game-active .tap-area {
    cursor: pointer;
}

.game-active .tap-indicator {
    animation: pulse 1s infinite;
}

/* Tap effect */
.tap-effect {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 70%, transparent 100%);
    border: 2px solid rgba(255,255,255,0.3);
    pointer-events: none;
    animation: tapRipple 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 
        0 0 20px rgba(255,255,255,0.3),
        inset 0 0 20px rgba(255,255,255,0.1);
}

@keyframes tapRipple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .player-info h2 {
        font-size: 20px;
    }
    
    .score {
        font-size: 24px;
        padding: 8px 16px;
    }
    
    .tap-indicator {
        font-size: 24px;
    }
    
    .game-info h1 {
        font-size: 28px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .countdown {
        font-size: 36px;
    }
}

/* Prevent zoom on tap */
.tap-area {
    touch-action: manipulation;
}

/* Disable text selection */
.tap-area, .btn {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* World Coin Integration Styles */


.verification-success {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 2000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.verification-success.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.success-content {
    background: rgba(76, 175, 80, 0.1);
    backdrop-filter: blur(30px);
    padding: 40px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 
        0 25px 60px rgba(0,0,0,0.2),
        0 10px 40px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.3);
    border: 2px solid rgba(76, 175, 80, 0.3);
    min-width: 300px;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: successBounce 0.8s ease-out;
}

@keyframes successBounce {
    0% { transform: scale(0.3) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.success-text {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.success-subtext {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

/* Enhanced verified state */
.verify-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.verify-btn:disabled:hover {
    transform: none;
}

/* World App connection animation */
@keyframes worldAppPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.world-app-indicator.connected #worldAppIcon {
    animation: worldAppPulse 2s infinite;
} 