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

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

/* --- Auth Pages --- */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.auth-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.6rem;
}

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

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #e85d04;
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.15);
}

.auth-btn {
    width: 100%;
    padding: 0.7rem;
    background: #e85d04;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s;
}

.auth-btn:hover {
    background: #c44d03;
}

.auth-btn-secondary {
    background: #6c757d;
}

.auth-btn-secondary:hover {
    background: #545b62;
}

.auth-error {
    background: #fee2e2;
    color: #c53030;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-link {
    text-align: center;
    margin-top: 1.2rem;
    color: #666;
}

.auth-link a {
    color: #e85d04;
    text-decoration: none;
    font-weight: 600;
}

.nav-link-btn {
    background: none;
    border: none;
    color: #006bb7;
    cursor: pointer;
    font-size: inherit;
    padding: 0;
    text-decoration: underline;
}

.user-email {
    font-weight: 600;
    margin-right: 0.5rem;
}

/* === Landing Page === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --landing-bg: #0f0f1a;
    --landing-bg-alt: #1a1025;
    --landing-surface: rgba(255, 255, 255, 0.05);
    --landing-surface-hover: rgba(255, 255, 255, 0.08);
    --landing-border: rgba(255, 255, 255, 0.1);
    --landing-text: #e8e6f0;
    --landing-text-muted: #9a95a8;
    --landing-accent: #e85d04;
    --landing-accent-glow: rgba(232, 93, 4, 0.3);
    --landing-accent-hover: #ff7b2e;
    --landing-ember: #ff6b35;
    --landing-gold: #fbbf24;
}

.landing {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(160deg, var(--landing-bg) 0%, var(--landing-bg-alt) 50%, #12101f 100%);
    color: var(--landing-text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Nav --- */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.landing-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.landing-logo span {
    background: linear-gradient(135deg, var(--landing-ember), var(--landing-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.landing-nav-link {
    color: var(--landing-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.landing-nav-link:hover {
    color: #fff;
    background: var(--landing-surface);
}

.landing-nav-cta {
    background: var(--landing-accent);
    color: #fff !important;
    font-weight: 600;
}

.landing-nav-cta:hover {
    background: var(--landing-accent-hover) !important;
    box-shadow: 0 0 20px var(--landing-accent-glow);
}

/* --- Hero --- */
.landing-hero {
    text-align: center;
    padding: 5rem 2rem 3rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--landing-accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--landing-surface);
    border: 1px solid var(--landing-border);
    border-radius: 100px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    color: var(--landing-gold);
    font-weight: 500;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.landing-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin: 0 0 1.2rem;
    position: relative;
    z-index: 1;
}

.landing-hero h1 .accent {
    background: linear-gradient(135deg, var(--landing-ember), var(--landing-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-hero-sub {
    font-size: 1.2rem;
    color: var(--landing-text-muted);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 1;
}

.landing-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.landing-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    border: none;
    cursor: pointer;
}

.landing-btn-primary {
    background: var(--landing-accent);
    color: #fff;
    box-shadow: 0 4px 16px var(--landing-accent-glow);
}

.landing-btn-primary:hover {
    background: var(--landing-accent-hover);
    box-shadow: 0 6px 24px var(--landing-accent-glow);
    transform: translateY(-2px);
}

.landing-btn-secondary {
    background: var(--landing-surface);
    color: var(--landing-text);
    border: 1px solid var(--landing-border);
}

.landing-btn-secondary:hover {
    background: var(--landing-surface-hover);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* --- Game Grid --- */
.landing-games {
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.landing-section-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--landing-accent);
    margin-bottom: 0.5rem;
}

.landing-section-heading {
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 2.5rem;
}

.landing-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}

.landing-game-card {
    border-radius: 12px;
    overflow: hidden;
    background: var(--landing-surface);
    border: 1px solid var(--landing-border);
    transition: all 0.3s;
}

.landing-game-card:hover {
    transform: translateY(-4px);
    border-color: var(--landing-accent);
    box-shadow: 0 8px 24px rgba(232, 93, 4, 0.15);
}

.landing-game-card img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.landing-game-info {
    padding: 0.6rem 0.75rem;
}

.landing-game-info h3 {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0 0 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.landing-game-info p {
    font-size: 0.72rem;
    color: var(--landing-text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.landing-game-tag {
    display: inline-block;
    background: rgba(232, 93, 4, 0.15);
    color: var(--landing-accent);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Features --- */
.landing-features {
    padding: 4rem 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.landing-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.landing-feature-card {
    background: var(--landing-surface);
    border: 1px solid var(--landing-border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.landing-feature-card:hover {
    background: var(--landing-surface-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.landing-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.landing-feature-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.6rem;
}

.landing-feature-card p {
    color: var(--landing-text-muted);
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

/* --- How It Works --- */
.landing-how {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.landing-step {
    text-align: center;
    position: relative;
}

.landing-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--landing-accent), var(--landing-ember));
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.landing-step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
}

.landing-step p {
    font-size: 0.85rem;
    color: var(--landing-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* --- CTA --- */
.landing-cta {
    text-align: center;
    padding: 5rem 2rem;
    position: relative;
}

.landing-cta::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 400px;
    background: radial-gradient(circle, rgba(232, 93, 4, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.landing-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin: 0 0 1rem;
    position: relative;
    z-index: 1;
}

.landing-cta p {
    color: var(--landing-text-muted);
    font-size: 1.1rem;
    margin: 0 0 2rem;
    position: relative;
    z-index: 1;
}

/* --- Footer --- */
.landing-footer {
    border-top: 1px solid var(--landing-border);
    padding: 2rem;
    text-align: center;
    color: var(--landing-text-muted);
    font-size: 0.85rem;
}

.landing-footer a {
    color: var(--landing-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.landing-footer a:hover {
    color: var(--landing-accent);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .landing-nav {
        flex-direction: column;
        gap: 1rem;
    }

    .landing-hero {
        padding: 3rem 1.5rem 2rem;
    }

    .landing-steps {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .landing-game-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .landing-game-card img {
        height: 90px;
    }

    .landing-game-info {
        padding: 0.5rem;
    }

    .landing-game-info h3 {
        font-size: 0.8rem;
    }

    .landing-game-info p {
        font-size: 0.7rem;
    }

    .landing-steps {
        grid-template-columns: 1fr;
    }
}