html, body {
    font-family: 'Roboto', 'Helvetica', 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
}

#app {
    height: 100%;
}

/* Loading Spinner */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-spinner {
    width: 60px;
    height: 60px;
}

.circular {
    animation: rotate 2s linear infinite;
    height: 100%;
    transform-origin: center center;
    width: 100%;
}

.path {
    stroke: #FFFFFF;
    stroke-dasharray: 1, 200;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
    stroke-linecap: round;
}

.loading-text {
    color: #FFFFFF;
    font-size: 1.2rem;
    margin-top: 20px;
    font-weight: 300;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -35px;
    }

    100% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -124px;
    }
}

/* Error UI */
#blazor-error-ui {
    background: #ffebee;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Custom Card Styles */
.stat-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    }

/* Payment Method Cards */
.payment-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

    .payment-card:hover {
        border-color: #2196F3;
        transform: scale(1.02);
    }

    .payment-card.selected {
        border-color: #2196F3;
        background-color: rgba(33, 150, 243, 0.08);
    }

/* Subscription Cards */
.subscription-card {
    position: relative;
    overflow: hidden;
}

    .subscription-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #2196F3 0%, #00BCD4 100%);
    }

/* Status Badges */
.status-active {
    background-color: #4CAF50 !important;
}

.status-inactive {
    background-color: #757575 !important;
}

.status-pending {
    background-color: #FF9800 !important;
}

.status-disconnected {
    background-color: #F44336 !important;
}

/* Responsive adjustments */
@media (max-width: 960px) {
    .mud-drawer {
        width: 240px !important;
    }
}

/* PWA Install Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #2196F3;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: none;
}

    .pwa-install-prompt.show {
        display: block;
        animation: slideUp 0.3s ease-out;
    }

@keyframes slideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom MudBlazor overrides */
.mud-appbar {
    backdrop-filter: blur(10px);
}

.mud-drawer {
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

/* Print styles */
@media print {
    .mud-appbar,
    .mud-drawer,
    .no-print {
        display: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
    }
}
