html, body {
    font-family: 'Inter', sans-serif;
    background-color: #fafafa;
}

#app {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #E91E63;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Custom MudBlazor overrides */
.mud-appbar {
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mud-drawer {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.mud-card {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.mud-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mud-button-root {
    border-radius: 8px;
    text-transform: none;
    font-weight: 500;
}

.mud-avatar {
    border-radius: 50%;
    overflow: hidden;
}

.mud-chip {
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Custom styles for social features */
.story-avatar {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.story-avatar::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    z-index: -1;
}

.story-avatar.viewed::before {
    background: #e0e0e0;
}

.feed-container {
    max-width: 100%;
}

.trending-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.trending-item:last-child {
    border-bottom: none;
}

/* Responsive design */
@media (max-width: 768px) {
    .mud-container {
        padding: 0 8px;
    }

    .mud-card {
        margin-bottom: 8px;
    }

    .story-avatar {
        width: 56px !important;
        height: 56px !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    html, body {
        background-color: #0d1117;
        color: #f0f6fc;
    }

    .mud-card {
        background-color: #161b22;
        border: 1px solid #30363d;
    }

    .mud-appbar {
        background-color: #161b22 !important;
        border-bottom: 1px solid #30363d;
    }

    .mud-drawer {
        background-color: #161b22;
        border-right: 1px solid #30363d;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Focus states */
.mud-button-root:focus {
    outline: 2px solid #E91E63;
    outline-offset: 2px;
}

.mud-input-root:focus-within {
    outline: 2px solid #E91E63;
    outline-offset: 2px;
}

/* Loading states */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px 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;
}