/* Game Wrapper Styles - Updated to match Neon Drop Game Over Screen */

@keyframes fadeIn { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

@keyframes slideUp { 
    from { transform: translateY(30px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

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

@keyframes glow { 
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.3); } 
    50% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.6); } 
}

@keyframes rotate { 
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); } 
}

@keyframes neonGlow { 
    0%, 100% { text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor; }
    50% { text-shadow: 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor; }
}

@keyframes chicletEntrance {
    0% { transform: translateY(-30px) scale(0.3) rotate(10deg); opacity: 0; }
    60% { transform: translateY(2px) scale(1.1) rotate(-3deg); opacity: 0.8; }
    100% { transform: translateY(0) scale(1) rotate(0deg); opacity: 1; }
}

.game-wrapper-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    animation: fadeIn 0.5s ease-out;
}

.welcome-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.2);
    text-align: center;
    max-width: 600px;
    width: 90%;
    box-shadow: 
        0 20px 60px rgba(0, 212, 255, 0.3),
        0 0 40px rgba(0, 212, 255, 0.1);
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.welcome-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(0, 212, 255, 0.1) 50%, transparent 70%);
    animation: rotate 3s linear infinite;
    pointer-events: none;
}

.welcome-content {
    position: relative;
    z-index: 1;
}

.welcome-icon {
    font-size: 48px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.welcome-title {
    color: #00d4ff;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 0 15px #00d4ff, 0 0 25px #00d4ff;
    animation: neonGlow 2s ease-in-out infinite;
    font-family: 'Bungee', monospace;
}

.welcome-subtitle {
    color: #cccccc;
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.5;
    text-shadow: 0 0 8px #cccccc;
}

.identity-section {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

.identity-section h3 {
    color: #00d4ff;
    margin-bottom: 15px;
    font-size: 20px;
}

.identity-section p {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
}

.game-name-input {
    background: rgba(0, 212, 255, 0.1);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 15px;
    font-size: 18px;
    color: #fff;
    width: 100%;
    max-width: 300px;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.game-name-input:focus {
    border-color: #00ff00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.3);
}

.game-name-input::placeholder {
    color: #666;
}

.error-message {
    color: #ff4444;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.security-notice {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.security-title {
    color: #ffd700;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.security-text {
    color: #ccc;
    font-size: 14px;
}

.player-info {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.player-name {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.player-label {
    color: #ccc;
    font-size: 14px;
}

.free-game-notice {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.free-game-title {
    color: #00ff00;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.free-game-text {
    color: #ccc;
    font-size: 14px;
}

.cross-device-notice {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 15px;
}

.cross-device-title {
    color: #ffd700;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.cross-device-text {
    color: #ccc;
    font-size: 14px;
}

.welcome-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.welcome-actions .btn {
    padding: 18px 35px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.welcome-actions .btn:hover {
    transform: translateY(-2px);
}

.welcome-actions .btn-primary {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #fff;
    border: none;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.welcome-actions .btn-primary:hover {
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
}

.welcome-actions .btn-secondary {
    background: transparent;
    color: #00d4ff;
    border: 2px solid #00d4ff;
}

.welcome-actions .btn-secondary:hover {
    background: rgba(0, 212, 255, 0.1);
} 

/* ============ MOBILE RESPONSIVE STYLES ============ */

/* Mobile Responsive Breakpoints */
@media (max-width: 768px) {
    .game-wrapper-overlay {
        padding: 20px;
    }
    
    .welcome-container {
        padding: 30px 20px;
        margin: 20px;
        max-width: 95%;
        border-radius: 15px;
    }
    
    .welcome-title {
        font-size: 28px;
        margin-bottom: 15px;
    }
    
    .welcome-subtitle {
        font-size: 16px;
        margin-bottom: 25px;
    }
    
    .identity-section {
        margin-bottom: 25px;
    }
    
    .identity-section h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    
    .identity-section p {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .game-name-input {
        width: 100%;
        padding: 15px;
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .player-info {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .player-name {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .player-label {
        font-size: 12px;
    }
    
    .free-game-notice,
    .cross-device-notice {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .free-game-title {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .free-game-text {
        font-size: 13px;
    }
    
    .cross-device-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .cross-device-text {
        font-size: 13px;
    }
    
    .welcome-actions {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .welcome-actions .btn {
        width: 100%;
        padding: 18px 20px;
        font-size: 16px;
        min-height: 44px; /* Apple's recommended minimum touch target */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Paywall specific mobile styles */
    .paywall-overlay {
        padding: 20px;
    }
    
    .paywall-modal {
        max-width: 95%;
        margin: 20px;
        padding: 30px 20px;
    }
    
    .paywall-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .paywall-description {
        font-size: 16px;
        margin-bottom: 25px;
    }
    
    .payment-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .payment-option {
        width: 100%;
        padding: 20px;
        margin-bottom: 10px;
    }
    
    .payment-option-title {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .payment-option-description {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .apple-pay-button {
        width: 100%;
        height: 50px;
        font-size: 16px;
        min-height: 44px;
    }
    
    .test-mode-notice {
        font-size: 14px;
        padding: 15px;
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    .welcome-container {
        padding: 25px 15px;
        margin: 15px;
        border-radius: 12px;
    }
    
    .welcome-title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .welcome-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .identity-section h3 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .identity-section p {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .game-name-input {
        padding: 12px;
        font-size: 16px; /* Prevent zoom on iOS */
        margin-bottom: 12px;
    }
    
    .player-name {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .player-label {
        font-size: 11px;
    }
    
    .free-game-title {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .free-game-text {
        font-size: 12px;
    }
    
    .cross-device-title {
        font-size: 15px;
        margin-bottom: 6px;
    }
    
    .cross-device-text {
        font-size: 12px;
    }
    
    .welcome-actions .btn {
        padding: 16px 18px;
        font-size: 15px;
        min-height: 44px;
    }
    
    .paywall-modal {
        padding: 25px 15px;
        margin: 15px;
    }
    
    .paywall-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    
    .paywall-description {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .payment-option {
        padding: 18px;
        margin-bottom: 8px;
    }
    
    .payment-option-title {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .payment-option-description {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .apple-pay-button {
        height: 48px;
        font-size: 15px;
    }
    
    .test-mode-notice {
        font-size: 13px;
        padding: 12px;
        margin-top: 15px;
    }
}

/* Touch-specific improvements */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .welcome-actions .btn:hover {
        transform: none;
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    }
    
    .payment-option:hover {
        transform: none;
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }
    
    .apple-pay-button:hover {
        transform: none;
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    }
    
    /* Increase touch targets */
    .welcome-actions .btn,
    .apple-pay-button,
    .payment-option {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Add active states for touch feedback */
    .welcome-actions .btn:active {
        transform: scale(0.98);
        background: rgba(0, 212, 255, 0.2);
    }
    
    .payment-option:active {
        transform: scale(0.98);
        background: rgba(0, 212, 255, 0.1);
    }
    
    .apple-pay-button:active {
        transform: scale(0.98);
        background: rgba(0, 212, 255, 0.2);
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Prevent zoom on input focus */
    input, textarea, select {
        font-size: 16px;
    }
    
    /* Fix for iOS Safari viewport issues */
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
    }
    
    /* Fix for iOS Safari position: fixed issues */
    .game-wrapper-overlay,
    .paywall-overlay {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Fix for iOS Safari button styling */
    .welcome-actions .btn,
    .apple-pay-button {
        -webkit-appearance: none;
        -webkit-border-radius: 12px;
        border-radius: 12px;
    }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    /* Fix for Android Chrome touch issues */
    .welcome-actions .btn,
    .apple-pay-button,
    .payment-option {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .welcome-container {
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px 15px;
    }
    
    .welcome-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .welcome-actions .btn {
        width: auto;
        flex: 1;
        min-width: 120px;
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .paywall-modal {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .payment-options {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .payment-option {
        width: auto;
        flex: 1;
        min-width: 150px;
        padding: 15px;
    }
} 