/**
 * BETDEMO PWA (Progressive Web App) CSS Stilleri
 * PWA kurulum butonu, bildirimler, offline durumu için
 */

/* PWA Kurulum Butonu */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    padding: 12px 20px;
    border-radius: 25px;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
    display: none;
    animation: slideInRight 0.5s ease;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    background: linear-gradient(45deg, #c0392b, #a93226);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

/* PWA Kurulum Butonu İkon */
.pwa-install-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Network Durum Bildirimi */
.network-status-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.5s ease;
}

.network-status-alert.alert-success {
    background: linear-gradient(45deg, #27ae60, #229954);
    color: #fff;
}

.network-status-alert.alert-warning {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: #fff;
}

/* Güncelleme Bildirimi */
.update-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    min-width: 300px;
    text-align: center;
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: slideInDown 0.5s ease;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: #fff;
}

.update-notification .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    transition: all 0.3s ease;
}

.update-notification .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* PWA Kurulum Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.5s ease;
}

.pwa-install-prompt .prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.pwa-install-prompt .prompt-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

.pwa-install-prompt .prompt-close {
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.pwa-install-prompt .prompt-close:hover {
    color: #e74c3c;
}

.pwa-install-prompt .prompt-message {
    color: #bdc3c7;
    margin-bottom: 20px;
    line-height: 1.5;
}

.pwa-install-prompt .prompt-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.pwa-install-prompt .btn-install {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pwa-install-prompt .btn-install:hover {
    background: linear-gradient(45deg, #c0392b, #a93226);
    transform: translateY(-1px);
}

.pwa-install-prompt .btn-later {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pwa-install-prompt .btn-later:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* PWA Durum Göstergesi */
.pwa-status-indicator {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 15px;
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.pwa-status-indicator .status-icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    animation: pulse 2s infinite;
}

.pwa-status-indicator.offline .status-icon {
    background: #e74c3c;
}

.pwa-status-indicator.updating .status-icon {
    background: #f39c12;
}

/* PWA Splash Screen */
.pwa-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    animation: fadeIn 0.5s ease;
}

.pwa-splash .splash-logo {
    font-size: 4rem;
    color: #e74c3c;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

.pwa-splash .splash-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.pwa-splash .splash-subtitle {
    font-size: 1.1rem;
    color: #bdc3c7;
    text-align: center;
    margin-bottom: 30px;
}

.pwa-splash .splash-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.pwa-splash .splash-progress-bar {
    height: 100%;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border-radius: 2px;
    animation: progressFill 2s ease-in-out;
}

.pwa-splash .splash-loading {
    font-size: 0.9rem;
    color: #bdc3c7;
    text-align: center;
}

/* PWA Offline Banner */
.pwa-offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: #fff;
    text-align: center;
    padding: 10px;
    z-index: 9999;
    animation: slideInDown 0.5s ease;
}

.pwa-offline-banner .offline-icon {
    margin-right: 8px;
    animation: pulse 2s infinite;
}

/* PWA Update Banner */
.pwa-update-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: #fff;
    text-align: center;
    padding: 10px;
    z-index: 9999;
    animation: slideInDown 0.5s ease;
}

.pwa-update-banner .update-icon {
    margin-right: 8px;
    animation: spin 2s linear infinite;
}

.pwa-update-banner .btn-update {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 5px 15px;
    border-radius: 5px;
    margin-left: 15px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.pwa-update-banner .btn-update:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* PWA Animasyonları */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes progressFill {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* PWA Responsive Tasarım */
@media (max-width: 768px) {
    .pwa-install-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .pwa-install-prompt {
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 15px;
    }
    
    .pwa-install-prompt .prompt-actions {
        flex-direction: column;
    }
    
    .pwa-install-prompt .btn-install,
    .pwa-install-prompt .btn-later {
        width: 100%;
        text-align: center;
    }
    
    .network-status-alert,
    .update-notification {
        left: 15px;
        right: 15px;
        min-width: auto;
    }
    
    .pwa-status-indicator {
        top: 15px;
        left: 15px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .pwa-splash .splash-title {
        font-size: 1.5rem;
    }
    
    .pwa-splash .splash-subtitle {
        font-size: 1rem;
    }
    
    .pwa-splash .splash-logo {
        font-size: 3rem;
    }
}

/* PWA Dark Mode Desteği */
@media (prefers-color-scheme: dark) {
    .pwa-install-prompt {
        background: rgba(0, 0, 0, 0.95);
    }
    
    .pwa-status-indicator {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* PWA High Contrast Mode */
@media (prefers-contrast: high) {
    .pwa-install-btn {
        border: 2px solid #fff;
    }
    
    .network-status-alert,
    .update-notification {
        border: 2px solid #fff;
    }
}

/* PWA Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .pwa-install-btn,
    .network-status-alert,
    .update-notification,
    .pwa-install-prompt,
    .pwa-splash {
        animation: none;
    }
    
    .pwa-status-indicator .status-icon,
    .pwa-splash .splash-logo,
    .pwa-offline-banner .offline-icon,
    .pwa-update-banner .update-icon {
        animation: none;
    }
}
