/* ===== PWA INSTALL PROMPT COMPONENT ===== */

.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 400px;
    width: calc(100% - 40px);
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: all 0.3s ease;
    border: 2px solid rgba(74, 144, 226, 0.5);
}

.pwa-install-prompt.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.pwa-prompt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pwa-prompt-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
}

.pwa-prompt-title {
    flex: 1;
}

.pwa-prompt-title h3 {
    font-size: 1.1rem;
    margin-bottom: 4px;
    color: white;
}

.pwa-prompt-title p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.pwa-prompt-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.pwa-prompt-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.pwa-prompt-buttons {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.pwa-prompt-btn {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.pwa-prompt-install {
    background: linear-gradient(135deg, #4a90e2 0%, #ff8c42 100%);
    color: white;
}

.pwa-prompt-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
}

.pwa-prompt-later {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.pwa-prompt-later:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 70px;
    right: 20px;
    background: rgba(255, 140, 66, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

.offline-indicator.online {
    background: rgba(74, 144, 226, 0.95);
}

.offline-indicator.hidden {
    display: none;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.connection-icon {
    font-size: 1.2rem;
}

/* Game Warning Banner */
.game-warning-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 140, 66, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 12px 20px;
    text-align: center;
    z-index: 998;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

.game-warning-banner.hidden {
    display: none;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.game-warning-banner strong {
    font-weight: 700;
}

/* Update available notification */
.update-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(74, 144, 226, 0.95);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 350px;
    animation: slideIn 0.3s ease;
}

.update-notification.hidden {
    display: none;
}

.update-notification-content {
    flex: 1;
}

.update-notification h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.update-notification p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.9;
}

.update-notification button {
    padding: 8px 16px;
    background: white;
    color: #4a90e2;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.update-notification button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .offline-indicator {
        top: 60px;
        right: 10px;
        font-size: 0.85rem;
        padding: 10px 16px;
    }

    .pwa-install-prompt {
        bottom: 10px;
        width: calc(100% - 20px);
    }

    .update-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
