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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #e2e8f0;
    min-height: 100vh;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #94a3b8;
}

.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin: 16px 0;
    color: #fecaca;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.install-btn-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.install-btn-fixed:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

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

@media (display-mode: standalone) {
    .install-btn-fixed {
        display: none !important;
    }

    .ios-install-prompt {
        display: none !important;
    }
}

@media (display-mode: standalone), (display-mode: fullscreen) {
    .install-btn-fixed {
        display: none !important;
    }
}

.install-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ios-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    padding: 16px;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.ios-prompt-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #e2e8f0;
}

.ios-prompt-content button {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
}

/* Network Status */
.network-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 8px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    z-index: 1001;
    transition: all 0.3s ease;
}

.network-status.offline {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    transform: translateY(0);
}

.network-status.online {
    transform: translateY(-100%);
}

/* PWA Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* PWA Responsive adjustments */
@media (display-mode: standalone) {
    body {
        /* Add padding for status bar in standalone mode */
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Mobile responsiveness for install button */
@media (max-width: 768px) {
    .install-btn-fixed {
        bottom: 80px; /* Move up to avoid interference with mobile UI */
        right: 16px;
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* iOS specific adjustments */
@supports (-webkit-touch-callout: none) {
    .ios-install-prompt {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }

    .install-btn-fixed {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
}