html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.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;
}

.content {
    padding-top: 1.1rem;
}

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;
}

.shuffle-button {
    background: #111;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s ease;
}

    .shuffle-button:hover {
        transform: scale(1.05);
    }

.generic-button {
    background: #111;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.2s ease;
    width: 300px;
}

    .generic-button:hover {
        transform: scale(1.05);
    }

.cards {
    display: grid;
    grid-template-columns: repeat(13, minmax(60px, 1fr));
    gap: 0.5rem;
    justify-items: center;
    margin: 1rem 0;
}

.playing-card {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 1.4rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.playing-card-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

    .playing-card:hover {
        transform: translateY(-2px);
    }

.red-card {
    color: #c1121f;
    font-weight: 600;
}

.black-card {
    color: #111;
    font-weight: 600;
}

.game-container {
    max-width: 1000px;
    margin: 2rem auto;
    text-align: center;
    font-family: system-ui, sans-serif;
}

.title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #666;
    margin-bottom: 2rem;
}

.deck-card {
    /*padding: 2rem*/
}

.section-title {
    margin-bottom: 1rem;
}

.stats {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.stat-box {
    border: 1px solid #ddd;
    background: white;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    width: 300px;
    height: 220px;
    box-sizing: border-box;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    overflow: hidden;
    flex-shrink: 0;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #777;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 5rem;
    font-weight: bold;
}

.stat-value-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.stat-value-text {
    font-size: 2.25rem;
    line-height: 1.15;
    text-align: center;
    overflow-wrap: break-word;
}

.stat-box-centered {
    display: flex;
    flex-direction: column;
    align-items: center;
}

    .stat-box-centered .stat-value {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
    }

.stats-row {
    align-items: flex-start;
    gap: 1.5rem;
}

.stat-box.match-score {
    transition: transform 0.6s cubic-bezier(.2,.8,.2,1), opacity 0.45s ease;
}

.stat-box.previous-best::before,
.stat-box.percentilescore-box::before {
    content: "";
    position: absolute;
    left: -0.75rem;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: #e6e6e6;
}

.locked-message {
    margin-top: 1.5rem;
    margin-bottom: 0.25rem;
    color: #2e7d32;
    font-weight: 600;
}

.share-button {
    margin-top: 1.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #111;
    border: 1px solid #e5e5e5;
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
}

    .share-button:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    }

.flip-card {
    animation: flipIn 0.35s ease-in-out;
    transform-style: preserve-3d;
}

@keyframes flipIn {
    0% {
        transform: rotateX(90deg);
        opacity: 0;
    }

    60% {
        transform: rotateX(-10deg);
        opacity: 1;
    }

    100% {
        transform: rotateX(0deg);
    }
}

.hidden-card {
    position: relative;
    background: linear-gradient(145deg, #b71c1c, #7f0000);
    border: 2px solid #ffffff;
    border-radius: 10px;
    overflow: hidden;
    color: transparent;
}

    /* inner border */
    .hidden-card::before {
        content: "";
        position: absolute;
        inset: 4px;
        border: 1px solid rgba(255,255,255,0.45);
        border-radius: 6px;
    }

    /* diamond pattern */
    .hidden-card::after {
        content: "";
        position: absolute;
        inset: 0;
        background-image: repeating-linear-gradient( 45deg, rgba(255,255,255,0.08) 0px, rgba(255,255,255,0.08) 6px, transparent 6px, transparent 12px ), repeating-linear-gradient( -45deg, rgba(255,255,255,0.08) 0px, rgba(255,255,255,0.08) 6px, transparent 6px, transparent 12px );
        opacity: 0.8;
    }

.poker-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid #ddd;
}

.poker-title {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #777;
    letter-spacing: 1px;
}

.poker-hand-name {
    font-size: 2rem;
    font-weight: bold;
    margin: 0.75rem 0 1rem;
}

.poker-cards {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fade-in {
    animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.your-hand {
    outline: 2px solid #4caf50;
    background: rgba(76, 175, 80, 0.12);
    border-radius: 10px;
    animation: bestPop 0.35s ease-out;
}

    .your-hand::after {
        content: "HAND";
        position: absolute;
        top: -10px;
        left: 50%;
        font-size: 10px;
        background: green;
        color: black;
        padding: 2px 6px;
        border-radius: 6px;
        font-weight: bold;
    }

.best-hand {
    outline: 2px solid gold;
    background: rgba(255, 215, 0, 0.15);
    border-radius: 10px;
    animation: bestPop 0.4s ease-out;
    z-index: 2;
}

    .best-hand::after {
        content: "BEST";
        position: absolute;
        top: -10px;
        left: 50%;
        font-size: 10px;
        background: gold;
        color: black;
        padding: 2px 6px;
        border-radius: 6px;
        font-weight: bold;
    }

@keyframes bestPop {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255,215,0,0);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 20px rgba(255,215,0,0.8);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes bestPulse {
    0% {
        box-shadow: 0 0 0 rgba(255,215,0,0.0);
    }

    50% {
        box-shadow: 0 0 18px rgba(255,215,0,0.6);
    }

    100% {
        box-shadow: 0 0 0 rgba(255,215,0,0.0);
    }
}

.poker-odds {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.rarity-common {
    border: 2px solid #d6d6d6;
}

.rarity-uncommon {
    border: 2px solid #4caf50;
    box-shadow: 0 0 12px rgba(76,175,80,0.25);
}

.rarity-rare {
    border: 2px solid #2196f3;
    box-shadow: 0 0 14px rgba(33,150,243,0.3);
}

.rarity-epic {
    border: 2px solid #9c27b0;
    box-shadow: 0 0 18px rgba(156,39,176,0.35);
}

.rarity-legendary {
    border: 2px solid #ff9800;
    box-shadow: 0 0 24px rgba(255,152,0,0.45);
}

.rarity-mythic {
    border: 2px solid #ff1744;
    box-shadow: 0 0 28px rgba(255,23,68,0.55);
    animation: mythicPulse 2s infinite;
}

.rarity-divine {
    border: 2px solid gold;
    box-shadow: 0 0 12px gold, 0 0 24px orange, 0 0 36px yellow;
    animation: divineGlow 1.5s infinite alternate;
}

@keyframes mythicPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes divineGlow {
    from {
        box-shadow: 0 0 12px gold, 0 0 24px orange;
    }

    to {
        box-shadow: 0 0 20px gold, 0 0 40px yellow, 0 0 60px orange;
    }
}

.previous-best {
    border-style: dashed;
    background: #fafafa;
    color: #666;
}

.percentilescore-positive {
    color: #2e7d32;
    font-weight: 700;
    transform: scale(1.1);
}

.percentilescore-negative {
    color: #c62828;
    font-weight: 700;
    transform: scale(1.1);
}

.percentilescore-neutral {
    color: #666;
}

.main-layout {
    min-height: 100vh;
    background: #f5f5f5;
}

.game-over-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #111;
    color: white;
    font-family: system-ui, sans-serif;
    padding: 2rem;
}

.game-over-title {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #aaa;
    margin-bottom: 1.5rem;
}

.game-over-winner {
    display: inline-block;
    padding: 0.75rem 2.5rem;
    font-size: 3.5rem;
    font-weight: bold;
    color: gold;
    border-radius: 999px;
    text-shadow: 0 0 12px gold, 0 0 24px orange, 0 0 36px yellow;
    animation: divineGlow 1.5s infinite alternate;
}

.game-over-subtitle {
    margin-top: 1rem;
    font-size: 1.3rem;
    color: #ccc;
}

.game-over-stats {
    margin-top: 2rem;
    font-size: 1rem;
    color: #888;
}

.top-bar {
    height: 64px;
    background: #111;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* NAV CONTAINER (UPDATED) */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* LEFT + RIGHT GROUPS */
.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* LINKS */
.top-nav .nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

    .top-nav .nav-link.active {
        border-bottom: 2px solid white;
    }

/* LOGOUT */
.logout-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: white;
    font-weight: 500;
}

.logout-form {
    margin: 0;
}

/* PROFILE ICON BUTTON */
.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border-radius: 999px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

    .nav-icon:hover {
        background: rgba(255,255,255,0.12);
        transform: translateY(-1px);
    }

/* ABOUT LINKS (you can delete this if removed from layout) */
.top-links a {
    color: #ccc;
    text-decoration: none;
}

.main-content {
    padding: 2rem;
}

/* =======================
   TABS
======================= */
.tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

    .tabs button {
        padding: 0.6rem 1.2rem;
        border: 1px solid #e5e5e5;
        background: #fff;
        border-radius: 999px;
        cursor: pointer;
        font-weight: 500;
        font-size: 0.9rem;
        transition: all 0.2s ease;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    }

        .tabs button:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(0,0,0,0.08);
        }

        .tabs button.active {
            background: #111;
            color: white;
            border-color: #111;
        }

/* =======================
   WRAPPER (FIXS JUMPING)
======================= */
.leaderboard-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* fixed width prevents left/right shift */
.leaderboard-container {
    width: 760px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

    .leaderboard-container.transitioning {
        opacity: 0;
        transform: translateY(10px) scale(0.99);
        filter: blur(2px);
    }

    .leaderboard-container.active {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }

/* =======================
   TABLE
======================= */
.leaderboard-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    text-align: center;
}

    .leaderboard-table th {
        background: #fafafa;
        font-weight: 600;
        font-size: 0.9rem;
        color: #555;
        padding: 1rem;
        border-bottom: 1px solid #eee;
        text-align: center;
    }

    .leaderboard-table td {
        padding: 0.9rem;
        text-align: center;
        border-bottom: 1px solid #f0f0f0;
        font-size: 0.95rem;
        font-weight: 600;
        color: #666;
        text-align: center;
    }

    /* row hover */
    .leaderboard-table tbody tr {
        transition: all 0.15s ease;
    }

        .leaderboard-table tbody tr:hover {
            background: #f7f7f7;
        }

        /* podium highlights */
        .leaderboard-table tbody tr:nth-child(1) {
            background: linear-gradient(90deg, rgba(255,215,0,0.15), transparent);
        }

        .leaderboard-table tbody tr:nth-child(2) {
            background: rgba(192,192,192,0.10);
        }

        .leaderboard-table tbody tr:nth-child(3) {
            background: rgba(205,127,50,0.10);
        }

.generic-input-field {
    max-width: 500px !important;
    margin: 0 auto 1rem auto !important;
}

.email-status {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #28a745;
}

.link-button {
    background: none;
    border: none;
    color: #0d6efd;
    padding: 0;
    margin-top: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.link-button:hover {
    text-decoration: underline;
}

.auth-action-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    margin: 20px;
}

    .auth-action-group .generic-button {
        min-width: 220px;
    }

/* === ACCOUNT LAYOUT === */

.account-layout {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

/* NAV becomes horizontal "tabs" instead of sidebar */
.account-nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

    .account-nav-list a {
        display: inline-block;
        padding: 0.5rem 1rem;
        border-radius: 999px;
        text-decoration: none;
        background: #f5f5f5;
        color: #333;
        font-weight: 500;
        transition: all 0.2s ease;
    }

        .account-nav-list a:hover {
            background: #eaeaea;
            transform: translateY(-1px);
        }

        .account-nav-list a.active {
            background: #111;
            color: white;
        }

/* CONTENT AREA */
.account-content {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

/* === PILL BUTTON (correct version) === */

.pill-button {
    all: unset;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    margin-bottom: 2%;
}

.pill-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.pill-button.active {
    background: #111;
    color: white;
    border-color: #111;
}

.deck-hidden {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
}

.deck-entrance {
    animation: deckFadeIn 500ms ease forwards;
}

@keyframes deckFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.how-to-play {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 24px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

.how-to-play h3 {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    color: #111;
}

.how-to-grid {
    display: grid;
    gap: 0.85rem;
}

.how-to-item {
    text-align: center;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.how-to-subtitle {
    margin-top: 2rem;
}

.how-to-highlight {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #111;
}

.how-to-odds {
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #666;
    word-break: break-word;
}
