html, body {
    margin: 0;
    min-height: 100%;
    font-family: "Segoe UI", "IBM Plex Sans", system-ui, sans-serif;
    color: #14201a;
    background:
        radial-gradient(1200px 600px at 10% -10%, #d7f5e3 0%, transparent 55%),
        radial-gradient(900px 500px at 100% 0%, #ffe8c8 0%, transparent 50%),
        linear-gradient(180deg, #f7faf8 0%, #eef3f0 100%);
}

.yt-shell {
    min-height: 100vh;
}

.yt-page {
    width: min(920px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.yt-hero {
    margin-bottom: 1.75rem;
}

.yt-brand {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: #0f6b3d;
}

.yt-hero h1 {
    margin: 0.35rem 0 0.5rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.15;
    font-weight: 750;
}

.yt-lead {
    margin: 0;
    max-width: 36rem;
    color: #3d4f45;
}

.yt-panel {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 40, 30, 0.08);
    border-radius: 18px;
    padding: 1.25rem 1.35rem 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px rgba(20, 40, 30, 0.06);
}

.yt-hint {
    margin: 0.75rem 0 0;
    color: #355043;
    font-size: 0.92rem;
}

.yt-resolutions {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid #dce6e0;
}

.yt-res-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.yt-res-item {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 0.55rem;
    align-items: center;
    padding: 0.7rem 0.85rem;
    border: 1px solid #c9d7cf;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
}

.yt-res-item.is-selected {
    border-color: #2ea86a;
    background: #f0faf4;
    box-shadow: 0 0 0 2px #2ea86a33;
}

.yt-res-item input {
    margin: 0;
}

.yt-res-main {
    font-weight: 700;
    min-width: 3.5rem;
}

.yt-res-meta {
    color: #5a6b62;
    font-size: 0.9rem;
}

.yt-actions-after {
    margin-top: 1rem;
    justify-content: flex-start;
}

.yt-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #355043;
}

.yt-input, .yt-select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #c9d7cf;
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font: inherit;
    background: #fff;
}

.yt-input:focus, .yt-select:focus {
    outline: 2px solid #2ea86a55;
    border-color: #2ea86a;
}

.yt-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 1rem;
    align-items: end;
    margin-top: 1rem;
}

.yt-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.yt-btn {
    border: 0;
    border-radius: 999px;
    padding: 0.7rem 1.15rem;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    background: #128a4b;
    color: #fff;
}

.yt-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.yt-btn-ghost {
    background: transparent;
    color: #128a4b;
    border: 1px solid #128a4b55;
}

.yt-error {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: #ffe8e4;
    color: #8a2418;
}

.yt-meta {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid #dce6e0;
}

.yt-thumb {
    width: 100%;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #dfe8e3;
}

.yt-meta h2 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    line-height: 1.35;
}

.yt-channel {
    margin: 0;
    color: #3d4f45;
    font-weight: 600;
}

.yt-stats, .yt-formats {
    margin: 0.45rem 0 0;
    color: #5a6b62;
    font-size: 0.92rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.55rem;
}

.yt-progress {
    margin-top: 1.1rem;
}

.yt-progress-bar {
    height: 10px;
    border-radius: 999px;
    background: #d7e4dc;
    overflow: hidden;
}

.yt-progress-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #1aa35a, #0f6b3d);
    transition: width 0.2s ease;
}

.yt-progress p {
    margin: 0.45rem 0 0;
    color: #355043;
    font-size: 0.9rem;
}

#blazor-error-ui {
    background: #ffe8e4;
    bottom: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 720px) {
    .yt-row, .yt-meta {
        grid-template-columns: 1fr;
    }

    .yt-actions {
        justify-content: stretch;
    }

    .yt-actions .yt-btn {
        flex: 1;
    }
}
