/* ============================================================
   Backyard R&D — custom styles layered on top of MudBlazor.
   MudBlazor handles the heavy lifting; this file is for the
   fun bits: the loading screen, brand marks, hero, and cards.
   ============================================================ */

html, body {
    margin: 0;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

h1:focus {
    outline: none;
}

/* ---------- Boot / loading splash (before Blazor starts) ---------- */
.app-loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #14131f;
    color: #f2f1f8;
    font-family: 'Roboto', sans-serif;
}

.app-loading-emoji {
    font-size: 3.5rem;
    animation: wiggle 1.6s ease-in-out infinite;
}

.app-loading-text {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: #b4b1c9;
    max-width: 22rem;
    padding: 0 1rem;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(-8deg); }
    50%      { transform: rotate(8deg); }
}

.loading-progress {
    position: relative;
    display: block;
    width: 6rem;
    height: 6rem;
    margin-top: 1.5rem;
}

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

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

.loading-progress-text {
    margin-top: 0.5rem;
    font-weight: 700;
    color: #f2f1f8;
}

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

/* ---------- Brand ---------- */
.brand-emoji {
    font-size: 1.6rem;
    line-height: 1;
}

.brand-title {
    font-weight: 700;
    line-height: 1.1;
}

.brand-subtitle {
    opacity: 0.75;
    line-height: 1;
}

/* ---------- Hero ---------- */
.hero-headline {
    font-weight: 800;
    letter-spacing: -0.02em;
    max-width: 18ch;
}

.hero-tagline {
    max-width: 60ch;
    font-size: 1.05rem;
}

/* ---------- Cards ---------- */
.project-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

.project-card .mud-card-content {
    flex-grow: 1;
}

.card-emoji {
    font-size: 2.4rem;
    line-height: 1;
}

/* ---------- Detail page ---------- */
.detail-header {
    background: var(--mud-palette-surface);
    border-radius: 14px;
}

.detail-emoji {
    font-size: 3.2rem;
    line-height: 1;
}

.detail-name {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.changelog-note {
    font-style: italic;
}

.detail-tabs .mud-tabs-panels {
    padding-top: 1.5rem;
}

/* ---------- About: code blocks ---------- */
.code-block {
    background: var(--mud-palette-background-gray, #f1f0f7);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 10px;
    padding: 1rem;
    overflow-x: auto;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    white-space: pre;
}

code {
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.9em;
}

.add-project-hint {
    border-style: dashed !important;
}

/* ---------- 404 ---------- */
.notfound-emoji {
    font-size: 4rem;
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 2rem 1rem 3rem;
    margin-top: 2rem;
}

/* ---------- Blazor error UI ---------- */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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;
}
