/* ========================================
   HIGHSCORES WEB - Platform-specific styles
   ======================================== */

/* App loading screen */
.app-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.app-loading-content {
    text-align: center;
    color: white;
}

.app-loading-logo {
    margin-bottom: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

.app-loading-spinner {
    margin-bottom: 1rem;
}

.app-loading-spinner .spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.app-loading-text {
    font-size: 0.875rem;
    opacity: 0.8;
}

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

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

/* Blazor error UI */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: #fee2e2;
    border-top: 2px solid #ef4444;
    padding: 0;
}

.blazor-error-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.875rem;
    color: #b91c1c;
}

.blazor-error-icon {
    font-size: 1.25rem;
}

.blazor-error-dismiss {
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: #b91c1c;
    opacity: 0.7;
}

.blazor-error-dismiss:hover {
    opacity: 1;
}

/* Blazor error boundary */
.blazor-error-boundary {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 0.5rem;
    padding: 1rem;
    color: #b91c1c;
    margin: 1rem 0;
}

.blazor-error-boundary::before {
    content: '⚠️ ';
}

/* Form validation styles */
.valid.modified:not([type=checkbox]) {
    border-color: #22c55e;
}

.invalid {
    border-color: #ef4444;
}

.validation-message {
    font-size: 0.75rem;
    color: #ef4444;
    margin-top: 0.25rem;
}

/* Focus styles */
h1:focus {
    outline: none;
}

/* Install prompt banner */
.install-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 1000;
    animation: slideInUp 0.3s ease-out;
}

.install-prompt-text {
    flex: 1;
}

.install-prompt-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.install-prompt-description {
    font-size: 0.875rem;
    opacity: 0.9;
}

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

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Offline indicator */
.offline-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 0.5rem;
    background-color: #f59e0b;
    color: white;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 9999;
    animation: slideInDown 0.3s ease-out;
}

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

/* Desktop-specific adjustments */
@media (min-width: 1024px) {
    /* Hover effects only on desktop */
    .card-interactive:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    /* No bottom nav on desktop */
    .app-bottom-nav {
        display: none;
    }
}

/* Print styles */
@media print {
    .app-header,
    .popup-menu,
    .app-bottom-nav,
    .fab,
    #blazor-error-ui {
        display: none !important;
    }

    .app-main {
        padding: 0 !important;
        margin: 0 !important;
    }

    body {
        background: white !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}
