:root {
    --primary: #aa884d;
    --primary-dark: #aa884d;
    --bg: #fff7f0;
    --muted: #777;
    --card: #ffffff;
    --radius: 12px;
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    --max-width: 1100px;
    --header-bg: var(--primary);
    --header-dark: var(--primary-dark);

    --site-header-bg: #010302;
    --site-header-dark: #010302;

    /* Light tints for backgrounds */
    --primary-light: color-mix(in srgb, var(--primary) 60%, white);
    --primary-lighter: color-mix(in srgb, var(--primary) 35%, white);

    --progress-bg: color-mix(in srgb, var(--primary) 20%, white);
    --progress-bg-light: color-mix(in srgb, var(--primary) 10%, white);
    --scrollbar-track: #f1f1f1;

    /* Button colors */

    --btn-cancel-bg: color-mix(in srgb, var(--primary) 10%, transparent);
    --btn-cancel-hover: color-mix(in srgb, var(--primary) 20%, transparent);
}

.page-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Matches contestant-card */
    padding: 12px;
    border: none;
    overflow: hidden;
}

.contestant-card {
    position: relative;
    /* Ensure overlay works */
}

* {
    box-sizing: border-box;
    font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial
}

body {
    background: var(--bg);
    color: #1f1f1f;
    margin: 0
}

.page-main {
    padding: 40px 0
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px
}

.banner {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 18px
}

.show-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px
}

.card {
    background: var(--card);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center
}

.card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px
}

.card h3 {
    margin: 8px 0 4px
}

.btn {
    background: var(--primary);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600
}

.btn.secondary {
    background: #fff;
    border: 1px solid #eee;
    color: var(--primary-dark)
}

.carousel {
    display: flex;
    gap: 12px;
    overflow: auto;
    padding: 12px 6px
}

.carousel::-webkit-scrollbar {
    height: 8px
}

.carousel::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 20px
}

.show-pill {
    min-width: 160px;
    background: linear-gradient(180deg, #fff, #fff);
    padding: 8px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--shadow)
}

.show-pill img {
    width: 140px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px
}

.show-name {
    font-weight: 600;
    margin-top: 8px
}

.show-link {
    display: block
}

.show-pill {
    cursor: pointer
}

.contestant {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%
}

.contestant img {
    width: 80px;
    height: 80px;
    border-radius: 8px
}

.contestant .meta {
    flex: 1
}

.progress {
    height: 10px;
    background: var(--progress-bg);
    border-radius: 999px;
    overflow: hidden
}

.progress>i {
    display: block;
    height: 100%;
    background: var(--primary);
    width: 0
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050
}

.modal {
    background: white;
    padding: 16px;
    border-radius: 10px;
    max-width: 420px;
    width: 100%;
    z-index: 1051
}

.field {
    margin-bottom: 10px
}

.field label {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px
}

.field input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #eee
}

@media(max-width:600px) {
    .container {
        padding: 0 16px
    }

    .card img {
        width: 100px;
        height: 100px
    }

    .page-main {
        padding: 28px 0
    }
}

.site-header {
    width: 100%;
    background: var(--site-header-bg);
    color: #fff;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    background: var(--site-header-bg);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand a {
    padding: 0px;
}
@media screen and (max-width: 767px) {
    .brand a {
        padding: 5px;
    }
    .ranking-badge {
        padding: 5px;
        font-weight: 700 !important;
        font-size: 15px !important;
    }
}

.site-logo {
    max-width: 135px;
    width: auto;
    object-fit: contain;
}

.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #fff;
    color: var(--header-bg);
    font-weight: 700;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-copy strong {
    display: block;
    font-size: 20px;
}

.brand-copy small {
    color: rgba(255, 255, 255, 0.8);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 999px;
    transition: background .2s;
}

.header-nav a:hover,
.header-nav a.active {
    background: rgba(255, 255, 255, 0.18);
}

.hero-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
}

.hero-banner a {
    cursor: pointer;
    text-decoration: none;
}

.hero-banner img {
    width: 100%;
    aspect-ratio: 3 / 1;
    object-fit: cover;
    display: block;
    filter: saturate(110%);
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.hero-content-inner {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    color: #fff;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.hero-title {
    font-size: 42px;
    margin: 8px 0;
}

.hero-description {
    max-width: 460px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
}

.hero-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    pointer-events: auto;
}

.hero-btn {
    background: #fff;
    color: var(--header-bg);
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    background: transparent;
    cursor: pointer;
}

.hero-arrow:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

@media(max-width:768px) {

    .site-header {
        height: 60px;
    }

    .header-inner {
        flex-direction: row;
        align-items: center;
        padding: 0 16px;
    }

    .site-logo {
        max-width: 115px;
        width: auto;
        object-fit: contain;
    }

    .brand-mark,
    .brand-copy {
        display: none;
    }

    .hero-title {
        font-size: 32px
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start
    }

    .hero-banner img {
        aspect-ratio: 1.5 / 1;
    }
}

.btn-vote {
    background: #ffffff;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.25s ease;
    text-decoration: none;
}

.btn-vote:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    pointer-events: none;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: #ffffff;
    width: 12px;
    height: 12px;
}

/* Horizontal Show Carousel */
.show-carousel-wrapper {
    position: relative;
    margin: 24px 0;
}

.show-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 12px 4px 20px 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    position: relative;
    scroll-snap-type: x proximity;
    scroll-padding: 0 calc(50% - 140px);
}

.show-carousel::-webkit-scrollbar {
    height: 6px;
}

.show-carousel::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 10px;
}

.show-carousel::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

.show-carousel::-webkit-scrollbar-thumb:hover {
    background: var(--primary-lighter);
}

.show-card {
    min-width: 280px;
    max-width: 280px;
    height: 160px;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 3px solid transparent;
    position: relative;
    scroll-snap-align: center;
    flex-shrink: 0;
}

.show-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.show-card.featured {
    border-color: var(--primary);
}

.show-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.show-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 16px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    text-align: left;
}

.show-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Contestant Grid Enhancements */
.contestant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.contestant-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all 0.3s ease;
    height: 100%;
    overflow: visible;
}

.contestant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.contestant-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    width: 100%;
    border-radius: 24px 24px 0 0;
}

.contestant-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ranking-badge {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    min-width: 48px;
    width: auto;
    height: 40px;
    padding: 0 12px;
    background: var(--primary);
    border-bottom-left-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: #ffffff;
    box-shadow: none;
    z-index: 5;
}
.wildcard-badge {
    position: absolute;
    top: 15px;
    left: -35px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
    padding: 2px 35px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid #fff;
    transform: rotate(-40deg);
    transform-origin: center;
}

.contestant-info {
    padding: 12px;
    text-align: left;
}

.contestant-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    padding: 40px 12px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.6) 60%, transparent 100%);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.progress {
    flex: 1;
    height: 12px;
    background: var(--progress-bg-light);
    border-radius: 999px;
    overflow: hidden;
}

.progress>i {
    display: block;
    height: 100%;
    background: var(--header-bg);
    width: 0;
    border-radius: 999px;
}

.vote-percentage-text {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    min-width: 40px;
    text-align: right;
}

.contestant-actions {
    padding: 0 12px 12px;
    margin-top: auto;
}

.contestant-actions .btn-vote {
    width: 100%;
    text-align: center;
    display: block;
    padding: 12px;
    font-size: 20px;
    font-weight: 600;
    background: #fff;
    border: 2px solid var(--header-bg);
    color: var(--header-bg);
    border-radius: 16px;
    transition: all 0.2s;
}

.contestant-actions .btn-vote:hover {
    background: var(--header-bg);
    color: #fff;
}

/* Section Headers */
.section-header {
    text-align: left;
    font-size: 32px;
    font-weight: 700;
    color: #1f1f1f;
    margin: 0px 0 0px 0;
}

@media(max-width: 768px) {
    .show-card {
        min-width: 240px;
        max-width: 240px;
    }

    .contestant-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }

    .section-header {
        font-size: 24px;
    }
}

/* Footer */
.site-footer {
    background: var(--site-header-bg);
    padding: 32px 0;
    margin-top: 60px;
    color: #fff;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo img {
    height: 70px;
    width: auto;
    object-fit: contain;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-2px);
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-align: center;
}

@media(max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: center;
    }

    .footer-content {
        align-items: center;
    }

    .footer-logo {
        order: -1;
    }
}

/* Admin Sidebar */
#sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
    height: 100vh;
}

/* Adjust main content to account for fixed sidebar */
@media (min-width: 768px) {
    main.col-md-9 {
        margin-left: 16.66667% !important; /* Width of col-md-3 */
    }
}

@media (min-width: 992px) {
    main.col-lg-10 {
        margin-left: 16.66667% !important; /* Width of col-lg-2 */
    }
}

.sidebar .nav-link {
    color: #555;
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
}

.sidebar .nav-link:hover {
    background: #f5f6f8;
    color: #000;
}

.sidebar .nav-link.active {
    background: rgba(13,110,253,.12);
    color: var(--primary);
}