html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f5f5f5;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1a73e8;
    border-color: #1765cc;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ============================================
   Bottom Nav Bar
   ============================================ */

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4rem;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom);
    order: 99;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #888;
    font-size: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: color 0.15s, background-color 0.15s;
    gap: 2px;
    min-width: 0;
    cursor: pointer;
    text-align: center;
}

.bottom-nav-item:hover {
    color: #1a1a2e;
    text-decoration: none;
}

.bottom-nav-item.active {
    color: #1a73e8;
}

.bottom-nav-icon {
    font-size: 1.1rem;
    line-height: 1;
    display: block;
    text-align: center;
}

.bottom-nav-label {
    line-height: 1;
    display: block;
    text-align: center;
}

.desktop-only {
    display: none !important;
}

@media (min-width: 769px) {
    .desktop-only {
        display: flex !important;
    }

    .bottom-nav {
        position: sticky;
        top: 0;
        bottom: auto;
        height: auto;
        border-top: none;
        border-bottom: 1px solid #e0e0e0;
        background: #fff;
        padding: 0.4rem 2rem;
        justify-content: center;
        gap: 0.25rem;
        order: 0;
        z-index: 99;
    }

    .bottom-nav-item {
        flex-direction: row;
        font-size: 0.85rem;
        gap: 0.35rem;
        padding: 0.4rem 0.75rem;
        border-radius: 6px;
    }

    .bottom-nav-item:hover {
        background-color: #f0f4ff;
        color: #1a73e8;
    }

    .bottom-nav-item.active {
        background-color: #e8f0fe;
        color: #1a73e8;
        font-weight: 600;
    }

    .bottom-nav-icon {
        font-size: 1.15rem;
    }
}

/* ============================================
   TVFriends App Styles
   ============================================ */

/* ---- Stats Dashboard ---- */

.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    text-align: center;
    min-height: 70px;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    opacity: 0;
    background: rgba(255, 255, 255, 0.15);
    transition: opacity 0.15s;
}

.stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.stat-box:hover::before {
    opacity: 1;
}

.stat-box:active {
    transform: translateY(0);
}

.stat-box-icon {
    font-size: 1rem;
    margin-bottom: 0.15rem;
    opacity: 0.9;
}

.stat-box-number {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.1;
}

.stat-box-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-top: 0.1rem;
}

/* Streak — warm gradient, spans full width when present */
.stat-streak {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #ff6b35, #ff3d00);
    color: #fff;
}

.stat-streak .stat-box-icon {
    font-size: 1.2rem;
}

.stat-streak .stat-box-number {
    font-size: 1.6rem;
}

/* Weekly episodes */
.stat-weekly {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}

/* Currently watching */
.stat-watching {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: #fff;
}

/* Completed this year */
.stat-completed {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
}

/* Total episodes */
.stat-total {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #fff;
}

@media (min-width: 769px) {
    .stats-dashboard {
        grid-template-columns: repeat(4, 1fr);
    }

    .stat-streak {
        grid-column: span 1;
    }
}

/* ---- Section Titles ---- */

/* Install button */
.btn-install {
    color: #fff;
    opacity: 0.85;
    font-size: 0.95rem;
    padding: 0.25rem 0.5rem;
    transition: opacity 0.15s;
}

.btn-install:hover {
    opacity: 1;
    color: #fff;
}

/* iOS install hint banner */
.ios-install-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #1a73e8;
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    gap: 0.5rem;
}

/* Section titles */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* Tier picker */
.tier-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tier-btn {
    text-align: center;
    font-weight: 600;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: transform 0.1s;
    font-size: 0.8rem;
    flex: 1 1 auto;
    min-width: 0;
}

.tier-btn:active {
    transform: scale(0.98);
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.empty-state h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state p {
    max-width: 300px;
    margin: 0 auto 1rem;
    font-size: 0.9rem;
}

/* Horizontally scrolling show row */
.show-scroll {
    display: flex;
    overflow-x: auto;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.show-scroll::-webkit-scrollbar {
    height: 4px;
}

.show-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

/* Show card (poster thumbnail) */
.show-card {
    flex: 0 0 auto;
    width: 120px;
    cursor: pointer;
    transition: transform 0.15s;
}

.show-card:hover {
    transform: translateY(-2px);
}

.show-card-sm {
    width: 100px;
}

.show-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.show-card-info {
    padding: 0.25rem 0;
}

.show-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Hero section (logged out home) */
.hero-section {
    text-align: center;
    padding: 3rem 1rem;
}

/* Auth page */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

/* Search page */
.search-bar .input-group {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 12px;
    overflow: hidden;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-result-card {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.search-result-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.search-poster {
    width: 80px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.search-result-overview {
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Show detail page */
.show-detail {
    position: relative;
}

.show-backdrop {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    margin: -1rem -1rem 1rem -1rem;
    position: relative;
}

.backdrop-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(245,245,245,1));
    border-radius: 12px;
}

.show-detail-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-poster {
    width: 130px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    flex-shrink: 0;
    margin-top: -60px;
    position: relative;
    z-index: 1;
}

.show-overview {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

.friend-progress-row {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.friend-progress-row:last-child {
    border-bottom: none;
}

.rating-stars {
    display: flex;
    gap: 0.25rem;
}

/* Watchlist page grid */
.watchlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.watchlist-card {
    cursor: pointer;
    position: relative;
    transition: transform 0.15s;
}

.watchlist-card:hover {
    transform: translateY(-2px);
}

.watchlist-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.watchlist-card-overlay {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.watchlist-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Friends page */
.friend-card {
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.friend-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.friend-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #8e24aa);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.friend-avatar-lg {
    width: 64px;
    height: 64px;
    font-size: 1.6rem;
}

/* Activity page */
.activity-group {
    overflow: hidden;
}

.activity-show-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-top: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.12s;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    border-radius: 8px;
}

.activity-show-row:first-of-type {
    border-top: none;
}

.activity-show-row:hover {
    background-color: #f8f9fa;
}

.activity-show-row:active {
    background-color: #f0f0f0;
}

.activity-poster {
    width: 50px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.activity-show-info {
    flex: 1;
    min-width: 0;
}

.activity-show-title {
    font-size: 0.9rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-comparison {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
}

.expand-chevron {
    transition: transform 0.2s;
    display: inline-block;
}

.expand-chevron.expanded {
    transform: rotate(90deg);
}

/* Shared show comparison rows */
.shared-show-row {
    display: flex;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s;
    align-items: center;
}

.shared-show-row:hover {
    background-color: #f8f9fa;
}

.shared-show-poster {
    width: 46px;
    height: 69px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.shared-show-info {
    flex: 1;
    min-width: 0;
}

.border-warning {
    border: 1px solid #ffc107 !important;
}

/* Recommendations / Discover page */
.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recommendation-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.recommendation-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.recommendation-poster {
    width: 90px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.recommendation-info {
    flex: 1;
    min-width: 0;
}

/* Card overrides for app feel */
.card {
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border-radius: 12px;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .show-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-poster {
        margin-top: -80px;
    }

    .show-backdrop {
        height: 180px;
    }

    .btn-group {
        overflow-x: auto;
        flex-wrap: nowrap !important;
    }

    .btn-group .btn {
        white-space: nowrap;
        font-size: 0.75rem;
    }
}

/* ============================================
   Season Detail & Episode List
   ============================================ */

.season-detail-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.season-detail-poster {
    width: 100px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.season-detail-info {
    flex: 1;
    min-width: 0;
}

.season-row {
    cursor: pointer;
    transition: background-color 0.15s;
}

.season-row:hover {
    background-color: #f8f9fa;
}

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.episode-card {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: box-shadow 0.15s, background-color 0.15s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.episode-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.episode-card:active {
    background-color: #f0f0f0;
}

.episode-watched {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.episode-still-container {
    position: relative;
    flex-shrink: 0;
    width: 120px;
}

.episode-still {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 6px;
}

.episode-still-placeholder {
    width: 120px;
    height: 68px;
    background: #e5e7eb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.episode-number-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 1px 6px;
    border-radius: 4px;
}

.episode-info {
    flex: 1;
    min-width: 0;
}

.episode-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.episode-overview {
    font-size: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.episode-check {
    font-size: 1.2rem;
    flex-shrink: 0;
    padding-left: 0.25rem;
}

/* Friend progress on season page */
.friend-season-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.friend-season-row:last-child {
    border-bottom: none;
}

.friend-season-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #8e24aa);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* Friend dots on episode rows */
.episode-friends {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.episode-friend-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: bold;
    cursor: default;
    transition: transform 0.1s;
}

.episode-friend-dot:hover {
    transform: scale(1.15);
}

.episode-friend-dot.watched {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.episode-friend-dot.not-watched {
    background: #e5e7eb;
    color: #9ca3af;
}

@media (max-width: 768px) {
    .season-detail-header {
        flex-direction: row;
    }

    .episode-still-container {
        width: 90px;
    }

    .episode-still {
        width: 90px;
        height: 51px;
    }

    .episode-still-placeholder {
        width: 90px;
        height: 51px;
    }

    .episode-overview {
        -webkit-line-clamp: 1;
    }
}

/* ============================================
   Rankings / Elo Comparison
   ============================================ */

.rank-tier-card {
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
}

.rank-tier-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

/* Head-to-head comparison */
.rank-comparison {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    justify-content: center;
}

.rank-contender {
    flex: 1;
    max-width: 200px;
    text-align: center;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: background-color 0.12s, transform 0.12s, box-shadow 0.12s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.rank-contender:hover {
    background: #e8f0fe;
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(26,115,232,0.2);
}

.rank-contender:active {
    transform: scale(0.97);
    background: #d2e3fc;
}

.rank-contender-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    margin-bottom: 0.5rem;
}

.rank-contender-title {
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.rank-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: #888;
    padding: 0 0.25rem;
    align-self: center;
}

/* Ranked list */
.rank-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rank-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.12s;
}

.rank-list-item:hover {
    background: #f8f9fa;
}

.rank-list-item-sm {
    padding: 0.3rem 0.5rem;
    gap: 0.5rem;
}

.rank-position {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a73e8, #4285f4);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

.rank-position-sm {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
}

.rank-list-item:first-child .rank-position {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.rank-list-item:nth-child(2) .rank-position {
    background: linear-gradient(135deg, #9ca3af, #6b7280);
}

.rank-list-item:nth-child(3) .rank-position {
    background: linear-gradient(135deg, #cd7f32, #b8600f);
}

.rank-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.rank-poster-sm {
    width: 30px;
    height: 45px;
}

.rank-item-info {
    flex: 1;
    min-width: 0;
}

.rank-list-compact {
    gap: 0.1rem;
}

@media (max-width: 768px) {
    .rank-contender {
        padding: 0.5rem;
    }

    .rank-contender-poster {
        max-width: 140px;
        margin-left: auto;
        margin-right: auto;
    }

    .rank-contender-title {
        font-size: 0.85rem;
    }
}