@font-face {
    font-family: 'Gazzetta-Custom';
    src: url('/GazzettaMediumSlanted.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

:root {
    --title-font: 'Bebas Neue', 'Gazzetta-Custom', sans-serif;
    --index-title-font-size-mobile: 56px;
    --index-title-font-size-laptop: 100px;
    --index-title-max-width-mobile: 360px;
    --index-title-max-width-laptop: 690px;
    --index-title-color-primary: #ffb347;
    --index-title-color-secondary: #ff8c42;
    --index-title-color-tertiary: #d45a00;
    --index-subtitle-font-size-mobile: 24px;
    --index-subtitle-font-size-laptop: 47px;
    --index-subtitle-max-width-mobile: 490px;
    --index-subtitle-max-width-laptop: 830px;
    --index-subtitle-color-primary: #b34700;
    --index-progress-font-size-mobile: 15px;
    --index-progress-font-size-laptop: 18px;
    --index-progress-max-width-mobile: 320px;
    --index-progress-max-width-laptop: 720px;
    --index-progress-color-primary: #000000;
    --index-buttons-font-size-mobile: 28px;
    --index-buttons-font-size-laptop: 36px;
    --ts12game-title-font-size-mobile: 54px;
    --ts12game-title-font-size-laptop: 74px;
    --ts12game-title-max-width-mobile: 360px;
    --ts12game-title-max-width-laptop: 680px;
    --ts12game-title-color-primary: #000000;
    --ts12game-tagline-font-size-mobile: 27px;
    --ts12game-tagline-font-size-laptop: 40px;
    --ts12game-tagline-max-width-mobile: 410px;
    --ts12game-tagline-max-width-laptop: 800px;
    --ts12game-tagline-color-primary: #000000;
    --ts12game-leaderboard-font-size-mobile: 35px;
    --ts12game-leaderboard-font-size-laptop: 41px;
    --ts12game-leaderboard-max-width-mobile: 320px;
    --ts12game-leaderboard-max-width-laptop: 640px;
    --ts12game-leaderboard-color-primary: #ffffff;
    --ts12game-buttons-font-size-mobile: 23px;
    --ts12game-buttons-font-size-laptop: 29px;
    --ts12game-tagline-line-height: 1.6;
    --ts12game-status-labels-font-size-mobile: 10px;
    --ts12game-status-labels-font-size-laptop: 12px;
    --ts12game-leaderboard-names-font-size-mobile: 18px;
    --ts12game-leaderboard-names-font-size-laptop: 22px;
    --ts12game-leaderboard-subtitle-font-size-mobile: 12px;
    --ts12game-leaderboard-subtitle-font-size-laptop: 14px;
}

body {
    font-family: 'Gazzetta-Custom', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    color: #000;
}

body * {
    text-transform: inherit;
}

::placeholder {
    text-transform: uppercase;
}

body.page-index {
    font-size: 40px;
    background-color: #80D8C2;
}

body.page-admin {
    background-color: #80D8C2;
    font-variation-settings: 'wght' 250;
}

body.page-ts12game {
    background: linear-gradient(135deg, #80D8C2 0%, #c2f7e7 50%, #fbe7c2 100%);
    min-height: 100vh;
    letter-spacing: 0.04em;
    --title-font: 'Gazzetta-Custom', sans-serif;
    --leaderboard-font: 'Bebas Neue', 'Gazzetta-Custom', sans-serif;
}

body.page-index h1,
body.page-index h2,
body.page-index h3,
body.page-index h4,
body.page-index h5,
body.page-admin h1,
body.page-admin h2,
body.page-admin h3,
body.page-admin h4,
body.page-admin h5 {
    font-family: var(--title-font);
    letter-spacing: 0.16em;
}

/* Shared button styles */
.button-62 {
    --button-gradient: linear-gradient(to bottom right, #EF4765, #FF9A5A);
    --button-height: 3rem;
    --button-padding-x: 1.5rem;
    background: var(--button-gradient);
    border: 0;
    border-radius: 9999px;
    color: #FFFFFF;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    font-size: clamp(0.88rem, 2.2vw, 1rem);
    font-weight: 400;
    letter-spacing: 0.18em;
    line-height: 1;
    min-height: var(--button-height);
    outline: transparent;
    padding: 0 var(--button-padding-x);
    text-align: center;
    text-decoration: none;
    text-transform: inherit;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    white-space: nowrap;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.18);
}

.button-62:disabled,
.button-62[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
    filter: grayscale(0.1);
}

.button-62:not([disabled]):focus-visible,
.button-62:not([aria-disabled="true"]):focus-visible {
    box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.5),
        -0.125rem -0.125rem 1rem rgba(239, 71, 101, 0.5),
        0.125rem 0.125rem 1rem rgba(255, 154, 90, 0.5);
    transform: translateY(-1px);
}

.button-62:not([disabled]):hover,
.button-62:not([aria-disabled="true"]):hover {
    box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.5),
        -0.125rem -0.125rem 1rem rgba(239, 71, 101, 0.5),
        0.125rem 0.125rem 1rem rgba(255, 154, 90, 0.5);
    transform: translateY(-1px);
}

.button-62.button-emerald {
    --button-gradient: linear-gradient(to bottom right, #1fbfa6, #6ee7b7);
}

.button-62.button-midnight {
    --button-gradient: linear-gradient(to bottom right, #111827, #1f2937);
}

.button-62.button-gold {
    --button-gradient: linear-gradient(to bottom right, #facc15, #f97316);
}

.button-62.button-rose {
    --button-gradient: linear-gradient(to bottom right, #ec4899, #f97316);
}

.button-62.button-ghost {
    --button-gradient: linear-gradient(to bottom right, #f5f5f5, #d1d5db);
    color: #0f172a;
}

.button-62.button-icon {
    --button-padding-x: 0;
    width: var(--button-height);
    min-width: var(--button-height);
    padding: 0;
}

.page-index .button-62 {
    font-size: var(--index-buttons-font-size-mobile);
}

@media (min-width: 1024px) {
    .page-index .button-62 {
        font-size: var(--index-buttons-font-size-laptop);
    }
}

.page-ts12game .button-62 {
    font-size: var(--ts12game-buttons-font-size-mobile);
}

@media (min-width: 1024px) {
    .page-ts12game .button-62 {
        font-size: var(--ts12game-buttons-font-size-laptop);
    }
}

/* Index styles */
.page-index .gazzetta-medium-slanted {
    font-family: 'Gazzetta-Custom', sans-serif;
    font-weight: 400;
}

.page-index .gradient-title {
    display: inline-block;
    background: linear-gradient(270deg,
            var(--index-title-color-primary),
            var(--index-title-color-secondary),
            var(--index-title-color-tertiary),
            var(--index-title-color-secondary),
            var(--index-title-color-primary));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease-in-out infinite;
    font-size: var(--index-title-font-size-mobile);
    max-width: var(--index-title-max-width-mobile);
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1024px) {
    .page-index .gradient-title {
        font-size: var(--index-title-font-size-laptop);
        max-width: var(--index-title-max-width-laptop);
    }
}

.page-index .subtitle-gradient {
    color: var(--index-subtitle-color-primary);
    letter-spacing: 0.08em;
    font-size: var(--index-subtitle-font-size-mobile);
    max-width: var(--index-subtitle-max-width-mobile);
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 1024px) {
    .page-index .subtitle-gradient {
        font-size: var(--index-subtitle-font-size-laptop);
        max-width: var(--index-subtitle-max-width-laptop);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.page-index .ticket-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
}

.page-index #baseImage {
    width: 100%;
    height: auto;
}

.page-index #ticketOverlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.page-index .ticket-text {
    position: absolute;
    font-weight: 400;
    color: #3B562B;
    white-space: nowrap;
    font-style: normal;
    font-family: 'Gazzetta-Custom', sans-serif;
    transform-origin: left top;
}

.page-index .shimmer {
    background: linear-gradient(-45deg, rgba(255, 255, 255, 0) 40%, rgba(255, 165, 0, 0.4) 50%, rgba(255, 255, 255, 0) 60%);
    background-size: 200% 200%;
    animation: shimmer 2.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.progress-card {
    width: 100%;
    max-width: 64rem;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.progress-bar-container {
    position: relative;
    height: 1.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.35);
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2);
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(270deg,
            var(--index-title-color-primary),
            var(--index-title-color-secondary),
            var(--index-title-color-tertiary),
            var(--index-title-color-secondary),
            var(--index-title-color-primary));
    background-size: 400% 400%;
    animation: gradientShift 6s ease-in-out infinite;
    transition: width 0.5s ease;
}

.progress-marker {
    position: absolute;
    top: 50%;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 3px solid rgba(0, 0, 0, 0.75);
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #000;
}

.page-index .progress-info {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: var(--index-progress-font-size-mobile);
    color: var(--index-progress-color-primary);
    max-width: var(--index-progress-max-width-mobile);
    margin-left: auto;
    margin-right: auto;
}

.page-index .progress-info span {
    background: rgba(255, 255, 255, 0.65);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.08em;
}

@media (min-width: 1024px) {
    .page-index .progress-info {
        font-size: var(--index-progress-font-size-laptop);
        max-width: var(--index-progress-max-width-laptop);
    }
}

.page-index .stripe-duo-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
}

.page-index .stripe-button-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1rem;
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.page-index .stripe-button-shell stripe-buy-button {
    display: block;
    width: 100%;
    max-width: 100%;
}

.page-index .stripe-toggle-button {
    --button-gradient: linear-gradient(to bottom right, #60a5fa, #a855f7);
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-index .stripe-toggle-button[aria-expanded="true"] {
    transform: translateY(-2px) scale(1.01);
}

.page-index .stripe-collapsible-panel {
    width: 100%;
}

@media (min-width: 640px) {
    .page-index .stripe-duo-wrapper {
        gap: 1rem;
        max-width: 28rem;
    }

    .page-index .stripe-button-shell {
        padding: 1rem 1.25rem;
    }
}

@media (min-width: 1024px) {
    .page-index .stripe-duo-wrapper {
        flex-direction: row;
        max-width: 36rem;
    }

    .page-index .stripe-button-shell {
        flex: 1 1 0;
    }
}

.page-index #previewButtons > * {
    transition: transform 0.2s ease;
}

@media (max-width: 640px) {
    .page-index #previewButtons {
        gap: 0.5rem;
    }
}

.page-index .ticket-option-shimmer {
    --accent-color: #f7931a;
    --accent-shadow: rgba(247, 147, 26, 0.65);
    --glitter-color: rgba(247, 147, 26, 0.35);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    border: 3px solid transparent;
    border-radius: 1.25rem;
    background-color: rgba(255, 255, 255, 0.92);
    padding: 0;
}

.page-index .ticket-option-shimmer::after {
    content: '';
    position: absolute;
    top: -150%;
    left: -150%;
    width: 400%;
    height: 400%;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0) 0%,
            var(--glitter-color) 38%,
            rgba(255, 255, 255, 0.85) 50%,
            var(--glitter-color) 62%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(15deg);
    animation: ticketShimmer 2.75s linear infinite;
    animation-play-state: paused;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-index .ticket-option-content {
    position: relative;
    border-radius: 1.1rem;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.page-index .ticket-option-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.page-index .ticket-option-shimmer:hover .ticket-option-image,
.page-index .ticket-option-shimmer.selected .ticket-option-image {
    transform: scale(1.05);
}

.page-index .ticket-option-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.75) 100%);
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.page-index .ticket-option-title {
    font-family: 'Gazzetta-Custom', sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    letter-spacing: 0.08em;
}

.page-index .ticket-option-description {
    font-size: 1rem;
    margin-top: 0.5rem;
    font-family: 'Gazzetta-Custom', sans-serif;
    font-weight: 400;
}

.page-index .ticket-option-shimmer:hover .ticket-option-info,
.page-index .ticket-option-shimmer:focus .ticket-option-info,
.page-index .ticket-option-shimmer:focus-within .ticket-option-info {
    opacity: 1;
}

.page-index .ticket-option-shimmer:hover,
.page-index .ticket-option-shimmer:focus,
.page-index .ticket-option-shimmer.selected {
    border-color: var(--accent-color);
    transform: scale(1.04);
    box-shadow: 0 0 22px rgba(0, 0, 0, 0.15), 0 0 28px var(--accent-shadow);
}

.page-index .ticket-option-shimmer:hover::after,
.page-index .ticket-option-shimmer:focus::after,
.page-index .ticket-option-shimmer.selected::after {
    animation-play-state: running;
    opacity: 1;
}

.page-index .ticket-option-shimmer[data-version="V1"] {
    --accent-color: #3B562B;
    --accent-shadow: rgba(59, 86, 43, 0.55);
    --glitter-color: rgba(59, 86, 43, 0.35);
}

.page-index .ticket-option-shimmer[data-version="V2"] {
    --accent-color: #95161A;
    --accent-shadow: rgba(149, 22, 26, 0.58);
    --glitter-color: rgba(149, 22, 26, 0.35);
}

.page-index .ticket-option-shimmer[data-version="V3"] {
    --accent-color: #00773C;
    --accent-shadow: rgba(0, 119, 60, 0.52);
    --glitter-color: rgba(0, 119, 60, 0.33);
}

.page-index .ticket-option-shimmer[data-version="V4"] {
    --accent-color: #9FAEC2;
    --accent-shadow: rgba(159, 174, 194, 0.52);
    --glitter-color: rgba(159, 174, 194, 0.35);
}

.page-index .ticket-option-shimmer[data-version="V5"] {
    --accent-color: #A597BF;
    --accent-shadow: rgba(165, 151, 191, 0.52);
    --glitter-color: rgba(165, 151, 191, 0.35);
}

.page-index .ticket-option-shimmer[data-version="V6"] {
    --accent-color: #E6AB68;
    --accent-shadow: rgba(230, 171, 104, 0.55);
    --glitter-color: rgba(230, 171, 104, 0.35);
}

@keyframes ticketShimmer {
    0% {
        transform: translate(-50%, -50%) rotate(15deg);
    }

    100% {
        transform: translate(50%, 50%) rotate(15deg);
    }
}

.page-index #generationForm label {
    font-size: clamp(1.75rem, 2.8vw, 2.75rem);
    letter-spacing: 0.08em;
}

.page-index #previewButtons {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
}

.page-index #previewButtons .preview-primary-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.page-index #previewButtons button,
.page-index #previewButtons a {
    min-height: var(--button-height, 3rem);
    width: 100%;
}

.page-index #followSwiftiesBtn {
    white-space: normal;
}

.page-index #previewContainer {
    position: fixed;
    inset: 0;
    padding: clamp(1rem, 6vw, 3rem);
    background-color: rgba(0, 0, 0, 0.78);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100;
    overflow-y: auto;
}

.page-index #previewContent {
    width: min(90vw, 600px);
    background: rgba(255, 255, 255, 0.96);
    border-radius: 2rem;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.page-index #generatedTicketImage {
    width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: 1.5rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.page-index #previewContainer .loading-spinner {
    margin: 2rem 0;
}

.page-index .loading-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Admin styles */
.page-admin .gradient-title {
    display: inline-block;
    background: linear-gradient(270deg, #ffb347, #ff8c42, #d45a00, #ff8c42, #ffb347);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 6s ease-in-out infinite;
}

.page-admin .progress-card {
    width: 100%;
    max-width: 64rem;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.page-admin .progress-bar-container {
    position: relative;
    height: 1.75rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.35);
    overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2);
}

.page-admin .progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    background: linear-gradient(270deg, #ffb347, #ff8c42, #d45a00, #ff8c42, #ffb347);
    background-size: 400% 400%;
    animation: gradientShift 6s ease-in-out infinite;
    transition: width 0.5s ease;
}

.page-admin .progress-marker {
    position: absolute;
    top: 50%;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 3px solid rgba(0, 0, 0, 0.75);
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #000;
}

.page-admin .progress-info {
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: clamp(0.75rem, 1.8vw, 1rem);
    color: #000;
}

.page-admin .progress-info span {
    background: rgba(255, 255, 255, 0.65);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.08em;
}

.page-admin .control-button {
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.page-admin .control-button:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.page-admin .control-button.active {
    background: linear-gradient(270deg, #ffb347, #ff8c42, #d45a00, #ff8c42, #ffb347);
    color: #fff;
}

/* TS12 Game styles */
.page-ts12game h1 {
    font-family: var(--title-font);
    letter-spacing: 0.14em;
}

.page-ts12game h2,
.page-ts12game h3,
.page-ts12game h4 {
    font-family: var(--leaderboard-font, var(--title-font));
    letter-spacing: 0.12em;
}

.page-ts12game .game-header-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.page-ts12game .game-title {
    color: var(--ts12game-title-color-primary);
    font-size: var(--ts12game-title-font-size-mobile);
    max-width: var(--ts12game-title-max-width-mobile);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.page-ts12game .game-tagline {
    color: var(--ts12game-tagline-color-primary);
    font-size: var(--ts12game-tagline-font-size-mobile);
    max-width: var(--ts12game-tagline-max-width-mobile);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: var(--ts12game-tagline-line-height);
}

.page-ts12game .leaderboard-title {
    color: var(--ts12game-leaderboard-color-primary);
    font-size: var(--ts12game-leaderboard-font-size-mobile);
    max-width: var(--ts12game-leaderboard-max-width-mobile);
}

@media (min-width: 1024px) {
    .page-ts12game .game-title {
        font-size: var(--ts12game-title-font-size-laptop);
        max-width: var(--ts12game-title-max-width-laptop);
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .page-ts12game .game-tagline {
        font-size: var(--ts12game-tagline-font-size-laptop);
        max-width: var(--ts12game-tagline-max-width-laptop);
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        line-height: var(--ts12game-tagline-line-height);
    }

    .page-ts12game .leaderboard-title {
        font-size: var(--ts12game-leaderboard-font-size-laptop);
        max-width: var(--ts12game-leaderboard-max-width-laptop);
    }
}

.page-ts12game .memory-card {
    position: relative;
    width: 100%;
    padding-top: 100%;
    perspective: 1200px;
}

@supports (aspect-ratio: 1 / 1) {
    .page-ts12game .memory-card {
        aspect-ratio: 1 / 1;
        padding-top: 0;
    }
}

.page-ts12game .memory-card button {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    perspective: inherit;
    outline: none;
}

.page-ts12game .card-inner {
    position: absolute;
    inset: 0;
    border-radius: 0.5rem;
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.18);
    transition: transform 0.55s ease;
    transform-style: preserve-3d;
}

.page-ts12game .flipped .card-inner,
.page-ts12game .matched .card-inner {
    transform: rotateY(180deg);
}

.page-ts12game .card-face {
    position: absolute;
    inset: 0;
    border-radius: 0.5rem;
    backface-visibility: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.page-ts12game .card-back {
    background-image: url('/versiones/logo.webp');
    background-repeat: no-repeat;
    background-size: 60%;
    background-position: center;
    background-color: rgba(255, 255, 255, 0.9);
}

.page-ts12game .card-front {
    transform: rotateY(180deg);
    border: 1px solid rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.92);
}

.page-ts12game .memory-card button:focus-visible .card-inner {
    outline: 3px solid #fb923c;
    outline-offset: 3px;
}

.page-ts12game .memory-card.matched .card-inner {
    box-shadow: 0 10px 25px rgba(60, 179, 113, 0.45);
}

.page-ts12game .board-wrapper {
    position: relative;
    width: 100%;
    padding: clamp(0.75rem, 2.75vw, 1.25rem) !important;
}

.page-ts12game .memory-card.shaking button {
    animation: memoryCardShake 1s ease;
}

@keyframes memoryCardShake {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    20% {
        transform: translate3d(-6px, 0, 0);
    }

    40% {
        transform: translate3d(6px, 0, 0);
    }

    60% {
        transform: translate3d(-4px, 0, 0);
    }

    80% {
        transform: translate3d(4px, 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .page-ts12game .memory-card.shaking button {
        animation: none;
    }
}

.page-ts12game .swap-indicator {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.page-ts12game .swap-indicator.visible {
    opacity: 1;
    transform: translateY(0);
}

.page-ts12game .level-selector {
    flex-wrap: nowrap;
}

.page-ts12game .level-selector .level-button {
    white-space: nowrap;
}

.page-ts12game #gameStatusBar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(0, 0, 0, 0.78);
    flex-wrap: wrap;
}

.page-ts12game #gameStatusBar .start-button {
    flex: 1 1 160px;
    min-width: 150px;
}

.page-ts12game #gameStatusBar .status-cluster {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 2 1 260px;
    min-width: 0;
}

.page-ts12game #gameStatusBar .status-list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
}

.page-ts12game #gameStatusBar .status-item {
    display: flex;
    flex: 1 1 0%;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.page-ts12game #gameStatusBar .status-label {
    font-size: var(--ts12game-status-labels-font-size-mobile);
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
}

.page-ts12game #gameStatusBar .status-value {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}

.page-ts12game #gameStatusBar .reset-button {
    --button-gradient: linear-gradient(to bottom right, #38bdf8, #34d399);
    border-radius: 9999px;
    width: 3rem;
    height: 3rem;
    font-size: 1.35rem;
    padding: 0;
    flex: 0 0 auto;
}

.page-ts12game #leaderboardList {
    font-family: var(--leaderboard-font, 'Bebas Neue');
    letter-spacing: 0.1em;
}

.page-ts12game .leaderboard-subtitle {
    font-size: var(--ts12game-leaderboard-subtitle-font-size-mobile);
}

.page-ts12game #leaderboardList .leaderboard-name {
    font-size: var(--ts12game-leaderboard-names-font-size-mobile);
}

.page-ts12game #leaderboardList li {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1.4fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.58);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.page-ts12game #leaderboardList li:nth-child(1) {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.85), rgba(255, 255, 255, 0.75));
}

.page-ts12game #leaderboardList li:nth-child(2) {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.85), rgba(255, 255, 255, 0.75));
}

.page-ts12game #leaderboardList li:nth-child(3) {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.85), rgba(255, 255, 255, 0.75));
}

.page-ts12game .preview-badge {
    font-family: var(--leaderboard-font, 'Bebas Neue');
    letter-spacing: 0.2em;
}

.page-ts12game #leaderboardList .leaderboard-state {
    font-size: var(--ts12game-leaderboard-subtitle-font-size-mobile);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.6);
}

.page-ts12game #recentAttemptsList {
    list-style: none;
    margin: 0;
    padding: 0;
    font-family: var(--leaderboard-font, 'Bebas Neue');
    letter-spacing: 0.08em;
}

.page-ts12game #recentAttemptsList li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.25rem;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.page-ts12game #recentAttemptsList .recent-attempt-name {
    font-size: 1.25rem;
    letter-spacing: 0.1em;
}

.page-ts12game #recentAttemptsList .recent-attempt-meta {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

.page-ts12game #recentAttemptsList .recent-attempt-time {
    margin-left: auto;
    font-size: 1.125rem;
    letter-spacing: 0.18em;
}

@media (min-width: 1024px) {
    .page-ts12game #gameStatusBar .status-label {
        font-size: var(--ts12game-status-labels-font-size-laptop);
    }

    .page-ts12game .leaderboard-subtitle {
        font-size: var(--ts12game-leaderboard-subtitle-font-size-laptop);
    }

    .page-ts12game #leaderboardList .leaderboard-name {
        font-size: var(--ts12game-leaderboard-names-font-size-laptop);
    }

    .page-ts12game #leaderboardList .leaderboard-state {
        font-size: var(--ts12game-leaderboard-subtitle-font-size-laptop);
    }

    .page-ts12game #recentAttemptsList .recent-attempt-name {
        font-size: 1.5rem;
    }

    .page-ts12game #recentAttemptsList .recent-attempt-time {
        font-size: 1.25rem;
    }
}

.page-ts12game .level-button.active {
    --button-gradient: linear-gradient(to bottom right, #f97316, #fb7185);
    transform: translateY(-1px);
}

.page-ts12game .result-summary {
    display: grid;
    gap: 0.5rem;
    font-size: clamp(1.1rem, 4vw, 1.4rem);
    letter-spacing: 0.16em;
}

.page-ts12game .result-summary .result-stat {
    font-size: clamp(1.45rem, 5vw, 2rem);
    letter-spacing: 0.18em;
}

.page-ts12game .board-wrapper.waiting-start {
    cursor: pointer;
}

.page-ts12game .board-wrapper.waiting-start .memory-card {
    opacity: 0.5;
}

.page-ts12game .board-wrapper.waiting-start .memory-card button {
    pointer-events: none;
}

.page-ts12game .board-wrapper.waiting-start::after {
    content: attr(data-overlay);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--leaderboard-font, 'Bebas Neue');
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.2em;
    color: rgba(0, 0, 0, 0.7);
    pointer-events: none;
}

.page-ts12game .split-grid,
.page-ts12game .memory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
}

.page-ts12game #gameBoard > * + * {
    margin-top: 1.1rem;
}

@media (max-width: 480px) {
    .page-ts12game .split-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .page-ts12game #gameStatusBar {
        gap: 0.5rem;
        padding: 0.65rem 0.85rem;
    }

    .page-ts12game #gameStatusBar .start-button {
        flex: 1 1 100%;
    }

    .page-ts12game #gameStatusBar .status-cluster {
        flex: 1 1 100%;
        gap: 0.5rem;
    }

    .page-ts12game #gameStatusBar .status-value {
        font-size: 1.15rem;
    }

    .page-ts12game #gameBoard > * + * {
        margin-top: 0.85rem;
    }
}

@media (min-width: 640px) {
    .page-ts12game .split-grid,
    .page-ts12game .memory-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.5rem;
    }
}

@media (min-width: 768px) {
    .page-ts12game .split-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .page-ts12game .memory-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

