/* PWA Specific Styles */
@media all and (display-mode: standalone) {
    .app-header {
        padding-top: env(safe-area-inset-top);
        height: calc(70px + env(safe-area-inset-top));
    }
    
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom);
        height: calc(70px + env(safe-area-inset-bottom));
    }
    
    .main-content {
        margin-top: calc(10px + env(safe-area-inset-top));
        margin-bottom: calc(80px + env(safe-area-inset-bottom));
    }
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease 2s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.splash-content {
    text-align: center;
    color: var(--white);
    animation: bounceIn 1s ease;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.splash-logo {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.splash-text {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.splash-subtext {
    opacity: 0.9;
}

/* Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 80px;
    left: 1rem;
    right: 1rem;
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 1001;
    animation: slideUp 0.3s ease;
    border: 2px solid var(--primary);
}

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

.install-prompt h4 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.install-prompt p {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.install-actions {
    display: flex;
    gap: 0.5rem;
}

/* Offline Notification */
.offline-notification {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--warning);
    color: var(--black);
    padding: 1rem;
    text-align: center;
    z-index: 999;
    animation: slideDown 0.3s ease;
}

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

/* Pull to refresh */
.pull-to-refresh {
    text-align: center;
    padding: 1rem;
    color: var(--gray);
}

.refresh-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(6, 164, 75, 0.2);
    border-left: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}