:root {
    --cup-red: #e31837;
    --cup-red-dark: #b8132d;
    --ink: #1c1f24;
    --soft: #f7f7f8;
    --line: #e8e8eb;
}

body {
    font-family: "Inter", Arial, sans-serif;
    background: linear-gradient(180deg, #ffffff 0%, #fff5f6 100%);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, .app-brand {
    font-family: "Orbitron", Arial, sans-serif;
    letter-spacing: 0.02em;
}

a {
    color: var(--ink);
}

a:hover, a:focus {
    color: var(--cup-red);
}

.app-navbar {
    background: #fff;
    border-bottom: 2px solid var(--line);
}

.app-brand {
    color: var(--cup-red);
    font-weight: 800;
}

.nav-link {
    font-weight: 600;
    color: var(--ink);
}

.nav-link:hover, .nav-link:focus {
    color: var(--cup-red);
}

.hero {
    background: radial-gradient(circle at right top, #ffdde2 0%, #ffffff 55%);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 2rem;
}

.app-card {
    border: 1px solid var(--line);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(227, 24, 55, 0.16);
}

/* Item detail panel: keep steady, show red emphasis always */
.item-detail-card {
    transform: none;
    box-shadow: 0 12px 30px rgba(227, 24, 55, 0.22);
    border-color: #ffd2da;
}

.item-detail-card:hover {
    transform: none;
    box-shadow: 0 12px 30px rgba(227, 24, 55, 0.22);
}

/* Legacy / non-listing cards only — listing uses .comp-card__img */
.app-card:not(.comp-card) img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.pill-countdown {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #ffe9ec;
    color: var(--cup-red-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-primary, .btn-success {
    background: var(--cup-red);
    border-color: var(--cup-red);
    font-weight: 600;
}

.btn-primary:hover, .btn-success:hover {
    background: var(--cup-red-dark);
    border-color: var(--cup-red-dark);
}

.btn-outline-primary {
    border-color: var(--cup-red);
    color: var(--cup-red);
}

.btn-outline-primary:hover {
    background: var(--cup-red);
    border-color: var(--cup-red);
}

.section {
    margin-top: 1.5rem;
}

/* Basket — centred layout, sensible promo field width */
.basket-page {
    max-width: 42rem;
    text-align: center;
}

.basket-page__table-wrap {
    max-width: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
}

.basket-page__table-wrap .table {
    margin-bottom: 0;
    text-align: center;
}

.basket-page__table-wrap .table th,
.basket-page__table-wrap .table td {
    vertical-align: middle;
}

.basket-page__promo-form {
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}

.basket-page__promo-input {
    max-width: 16rem;
    width: 100%;
}

.table {
    background: #fff;
    border-radius: 0.75rem;
    overflow: hidden;
}

.auth-card, .admin-card {
    max-width: 720px;
    margin: 2rem auto;
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
    padding: 1.5rem;
}

.admin-card--wide {
    max-width: 1100px;
}

/* Admin shell (CultComps branding) */
.admin-body {
    background: linear-gradient(180deg, #faf7f8 0%, #ffffff 45%, #fff5f6 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-body--auth .admin-page__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
}

.admin-body--auth .auth-card {
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
}

.admin-header {
    background: #fff;
    border-bottom: 3px solid var(--cup-red);
    box-shadow: 0 4px 20px rgba(227, 24, 55, 0.08);
}

.admin-header__brand {
    text-decoration: none;
    font-family: "Orbitron", Arial, sans-serif;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.2;
}

.admin-header__brand:hover,
.admin-header__brand:focus-visible {
    text-decoration: none;
}

.admin-header__brand-name {
    color: var(--cup-red);
}

.admin-header__brand-suffix {
    color: var(--ink);
    font-weight: 600;
    margin-left: 0.4rem;
    font-size: 0.88em;
}

.admin-header__link {
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.9rem;
}

.admin-header__link:hover,
.admin-header__link:focus-visible {
    color: var(--cup-red);
}

.admin-page__inner {
    flex: 1 0 auto;
}

.muted {
    color: #5f6672;
}

.site-footer {
    background: #111317;
    color: #f3f4f6;
    border-top: 3px solid var(--cup-red);
    margin-top: auto;
}

.site-footer a {
    color: #ffd4db;
    text-decoration: none;
}

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

.legal-card {
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: #fff;
    padding: 1.5rem;
    max-width: 920px;
    margin: 0 auto;
}

.legal-card ul {
    padding-left: 1.2rem;
}

.cookie-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    background: #1f232a;
    color: #fff;
    border: 1px solid #3b414c;
    border-radius: 0.75rem;
    padding: 0.9rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Competition listing cards (home / ending soon) */
.comp-card {
    position: relative;
    text-align: left;
}

.comp-card__admin-flag {
    background: #fff0f2;
    color: var(--cup-red-dark);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--line);
}

.comp-card__drawline {
    padding: 0.5rem 0.75rem 0;
}

.comp-card__drawpill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--cup-red-dark);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
}

.comp-card__media {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--soft);
    flex-shrink: 0;
}

.comp-card__media:focus-visible {
    outline: 2px solid var(--cup-red);
    outline-offset: 2px;
}

.comp-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.comp-card:hover .comp-card__img {
    transform: scale(1.03);
}

.comp-card__title {
    font-family: "Orbitron", Arial, sans-serif;
    letter-spacing: 0.02em;
}

.comp-card__price {
    font-family: "Orbitron", Arial, sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--cup-red);
    margin-bottom: 0;
}

.comp-card__price-note {
    font-family: "Inter", Arial, sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    opacity: 0.85;
}

.comp-card__snippet {
    line-height: 1.45;
}

.comp-card__bar {
    height: 6px;
    border-radius: 999px;
    background: #ececf0;
    overflow: hidden;
}

.comp-card__bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--cup-red-dark), var(--cup-red));
    transition: width 0.4s ease;
}

.comp-countdown--split {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: 0.75rem;
    background: linear-gradient(180deg, #fafafa 0%, #f0f1f4 100%);
    border: 1px solid var(--line);
}

/* >24h: only show days (hide hrs / mins / secs) */
.comp-countdown--split.comp-countdown--over-day {
    grid-template-columns: 1fr;
    max-width: 8rem;
    margin-left: auto;
    margin-right: auto;
}

.comp-countdown--split.comp-countdown--over-day .comp-countdown__cell:not(:first-child) {
    display: none;
}

/* ≤24h: hide days column; hours show total remaining hours */
.comp-countdown--split.comp-countdown--under-day {
    grid-template-columns: repeat(3, 1fr);
}

.comp-countdown--split.comp-countdown--under-day .comp-countdown__cell:first-child {
    display: none;
}

.comp-countdown__cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.comp-countdown__num {
    font-family: "Orbitron", Arial, sans-serif;
    font-size: clamp(1rem, 2.8vw, 1.35rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
}

.comp-countdown__lbl {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.comp-countdown--ended .comp-countdown__num {
    color: #9ca3af;
}

.comp-countdown--ended .comp-countdown__lbl {
    font-size: 0.6rem;
}

/* Admin dashboard tiles */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.admin-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    text-decoration: none;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    min-height: 150px;
    padding: 1rem;
    box-shadow: 0 8px 18px rgba(28, 31, 36, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-tile:hover,
.admin-tile:focus-visible {
    color: var(--ink);
    border-color: #ffc4cf;
    box-shadow: 0 14px 28px rgba(227, 24, 55, 0.16);
    transform: translateY(-2px);
}

.admin-tile__icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: linear-gradient(180deg, #fff5f7 0%, #ffdbe2 100%);
    border: 1px solid #ffc4cf;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    line-height: 1;
}

.admin-tile__label {
    font-weight: 600;
    text-align: center;
    line-height: 1.25;
}
