* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #4a9eff;
    --accent-2: #c8a2ff;
    --border: #1b2838;
    --text-muted: #8899aa;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background:
        radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%),
        linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
        url('/static/background.jpg') center/cover no-repeat fixed;
    background-color: #000;
    color: #e0e0e0;
    min-height: 100vh;
    line-height: 1.6;
}

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

main {
    animation: fadeUp 0.4s ease-out;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Navigation */
nav {
    background: #0a0a0a;
    border-bottom: 1px solid #0d1b2a;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 36px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    font-size: 0.9rem;
    color: #8899aa;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #fff;
    text-decoration: none;
}

.nav-links a.active {
    color: #fff;
}

.nav-links a.active::after {
    content: "";
    display: block;
    height: 2px;
    margin-top: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1rem;
    line-height: 1;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
}

.nav-toggle:hover {
    border-color: #2a4a7f;
}

/* Main */
main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero-banner {
    display: block;
    max-width: 500px;
    max-height: 200px;
    height: auto;
    width: auto;
    margin: 0 auto 1.5rem;
    border-radius: 12px;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #eef4ff;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.subtitle {
    font-size: 1.15rem;
    color: #c3d2e6;
    margin-top: 0.75rem;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

.cta-buttons {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #2a5a9a 0%, #6a4a9a 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(74, 158, 255, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3366ab 0%, #7a55ab 100%);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.34);
    text-decoration: none;
}

.btn:focus-visible {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

.btn-secondary {
    background: #111;
    color: #e0e0e0;
    border: 1px solid #333;
}

.btn-secondary:hover {
    background: #1a1a1a;
    text-decoration: none;
}

.btn-small {
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #1b2838;
    background: #0d1b2a;
    color: #e0e0e0;
}

.btn-small:hover {
    background: #1b2838;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature {
    background: #0a0a0a;
    border: 1px solid #1b2838;
    border-radius: 12px;
    padding: 1.5rem;
}

.feature h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.feature p {
    font-size: 0.9rem;
    color: #667788;
}

/* How it works */
.steps {
    margin-top: 3rem;
    text-align: center;
}

.steps-head h2 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
    background: linear-gradient(90deg, var(--accent), var(--accent-2)) left bottom / 3rem 2px no-repeat;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.steps-desc {
    color: #667788;
    font-size: 0.95rem;
    margin-top: 0.4rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.step {
    background: rgba(10, 10, 14, 0.85);
    border: 1px solid #1b2838;
    border-radius: 12px;
    padding: 1.5rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.step:hover {
    border-color: #2a4a7f;
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.12), 0 8px 28px rgba(0, 0, 0, 0.45);
    transform: translateY(-2px);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a5a9a 0%, #6a4a9a 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.step h3 {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 0.4rem;
}

.step p {
    font-size: 0.9rem;
    color: #667788;
}

.steps-cta {
    margin-top: 1rem;
}

/* Game selection */
.game-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.games-spacer {
    height: 20vh;
}

.game-card {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    background: #0a0a0a;
    border: 1px solid #1b2838;
    border-radius: 12px;
    transition: border-color 0.2s;
}

.game-card:hover,
.game-card.open {
    z-index: 60;
}

.game-card:hover {
    border-color: #2a4a7f;
}

.game-card-main {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    transition: transform 0.2s;
}

a.game-card-main:hover {
    text-decoration: none;
}

.game-card-coming {
    opacity: 0.75;
    cursor: default;
}

.game-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
}

.game-card-body {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.game-card-body h3 {
    font-size: 1.05rem;
    color: #fff;
    margin: 0;
}

.status-available {
    background: #0a1a0a;
    color: #44cc44;
}

.status-soon {
    background: #1a1a0a;
    color: #ccaa44;
}

.game-card-toggle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 5;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    border: 1px solid #1b2838;
    background: rgba(10, 10, 10, 0.85);
    color: #fff;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.2s;
}

.game-card.open .game-card-toggle {
    transform: rotate(180deg);
}

.game-card-drop {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
    background: #0a0a0a;
    border: 1px solid #1b2838;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 0.9rem 1rem 1.1rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    text-align: left;
}

.game-card-drop strong {
    display: block;
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.game-card-drop ul {
    list-style: none;
    margin: 0;
}

.game-card-drop li {
    font-size: 0.8rem;
    color: #8899aa;
    padding: 0.35rem 0;
    border-bottom: 1px solid #1b2838;
}

.game-card-drop li:last-child {
    border-bottom: none;
}

.game-card-drop li span {
    color: #c3d2e6;
    font-weight: 600;
}

.game-card-drop p {
    color: #ccaa44;
    font-size: 0.9rem;
    text-align: center;
    margin: 0.25rem 0;
}

.game-card.open .game-card-drop {
    display: block;
}

/* Game card hover reveal — mouse devices only (touch uses the toggle) */
@media (hover: hover) and (pointer: fine) {
    .game-card:hover .game-card-drop {
        display: block;
    }

    .game-card:not(.game-card-coming):hover .game-card-main {
        transform: translateY(-2px);
    }
}

/* Forms */
.form-section {
    max-width: 480px;
    margin: 3rem auto;
    background: #0a0a0a;
    border: 1px solid #1b2838;
    border-radius: 12px;
    padding: 2rem;
}

.form-section h2 {
    margin-bottom: 0.5rem;
}

.form-desc {
    color: #667788;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #667788;
}

label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #8899aa;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #1b2838;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #2a4a7f;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4a9eff;
    background: rgba(4, 8, 16, 0.75);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.18);
}

textarea {
    resize: vertical;
}

button[type="submit"].btn {
    width: 100%;
    margin-top: 0.5rem;
}

/* Dashboard */
.dashboard h2,
.admin-dashboard h2 {
    margin-bottom: 1.5rem;
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.dash-header h2 {
    margin-bottom: 0;
}

.card {
    background: #0a0a0a;
    border: 1px solid #1b2838;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.feature,
.pricing-card,
.form-section {
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
    border-color: #2a4a7f;
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.12), 0 8px 28px rgba(0, 0, 0, 0.45);
}

.feature:hover,
.pricing-card:hover {
    border-color: #2a4a7f;
    box-shadow: 0 0 0 1px rgba(74, 158, 255, 0.12), 0 8px 28px rgba(0, 0, 0, 0.45);
}

.card h3 {
    margin-bottom: 1rem;
    color: #fff;
}

.card p {
    color: #667788;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.upload-form label {
    margin-top: 0.5rem;
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th,
td {
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid #1b2838;
}

th {
    color: #667788;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: #ccc;
}

/* Status badges */
.status {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background: #1a1a0a;
    color: #ccaa44;
}

.status-processing {
    background: #0d1b2a;
    color: #4a9eff;
}

.status-completed {
    background: #0a1a0a;
    color: #44cc44;
}

.status-rejected {
    background: #1a0a0a;
    color: #ff4444;
}

/* Alerts */
.alert {
    padding: 0.7rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-error {
    background: #1a0a0a;
    border: 1px solid #332222;
    color: #ff6c6c;
}

/* Inline form */
.inline-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.inline-form input,
.inline-form select {
    width: auto;
    margin-bottom: 0;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
}

.inline-form button {
    white-space: nowrap;
}

.empty {
    color: #444 !important;
    font-style: italic;
}

details summary {
    font-size: 0.85rem;
    font-weight: 600;
}

details pre {
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* Pricing Page */
.pricing-page {
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    background: #0a0a0a;
    border: 1px solid #1b2838;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
}

.pricing-sliders .slider-group {
    margin-bottom: 1.5rem;
}

.slider-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ccc;
}

.slider-group input[type="range"] {
    width: 100%;
    margin: 0.5rem 0;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #1b2838;
    border-radius: 3px;
    outline: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a9eff;
    cursor: pointer;
    border: 2px solid #4a9eff;
}

.slider-marks, .slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: #555;
}

.slider-marks .mark {
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.slider-marks .mark.active {
    color: #fff;
    background: #0d1b2a;
}

.duration-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.duration-btn {
    flex: 1;
    min-width: 80px;
    text-align: center;
    padding: 0.5rem 0.75rem;
    background: #000;
    border: 1px solid #1b2838;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #667788;
    transition: all 0.2s;
}

.duration-btn input { display: none; }

.duration-btn.active {
    border-color: #4a9eff;
    color: #fff;
    background: #0d1b2a;
}

.duration-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #1b2838;
    color: #556;
}

.duration-btn.disabled .badge {
    color: #556;
}

.duration-btn .badge {
    display: block;
    font-size: 0.7rem;
    color: #4a9eff;
    margin-top: 0.15rem;
}

/* Pricing Total Sidebar */
.pricing-total {
    background: #000;
    border: 1px solid #1b2838;
    border-radius: 12px;
    padding: 1.5rem;
    align-self: start;
    position: sticky;
    top: 80px;
}

.pricing-total h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: #8899aa;
}

.summary-row.total-row {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    padding-top: 0.5rem;
}

.summary-row hr {
    border: none;
    border-top: 1px solid #1b2838;
    margin: 0.5rem 0;
}

/* Responsive — Tablet */
@media (max-width: 768px) {
    main {
        padding: 1.5rem;
    }

    .pricing-card {
        grid-template-columns: 1fr;
    }

    .pricing-total {
        position: static;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .inline-form {
        flex-wrap: wrap;
    }

    .inline-form input,
    .inline-form select {
        width: 100%;
    }

    /* Wrap flex containers in cards */
    .card > div[style*="display:flex"],
    .card > div[style*="display: flex"] {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Mobile: scroll with page instead of fixed attachment */
    body {
        background-attachment: scroll;
        background-position: top center;
    }
}

/* Responsive — Mobile */
@media (max-width: 640px) {
    nav {
        padding: 0 1rem;
    }

    .nav-inner {
        flex-wrap: wrap;
        position: relative;
        height: auto;
        padding: 0.6rem 0;
        gap: 0;
    }

    .nav-toggle {
        display: inline-block;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        padding: 0.6rem 0 0.2rem;
    }

    .nav-inner.nav-open .nav-links {
        display: flex;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.15rem 0;
    }

    .nav-links a.active::after {
        display: none;
    }

    .nav-links a {
        font-size: 0.82rem;
    }

    main {
        padding: 1rem;
    }

    .hero {
        padding: 1.5rem 0 1rem;
    }

    .hero-banner {
        max-height: 150px;
        border-radius: 8px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature {
        padding: 1.25rem;
    }

    /* Game selection — compact 2-up on phones */
    .game-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 0.75rem;
        margin-top: 1.25rem;
    }

    .game-card-body {
        flex-direction: column;
        align-items: center;
        gap: 0.4rem;
        padding: 0.7rem 0.75rem 0.9rem;
    }

    .game-card-body h3 {
        font-size: 0.9rem;
        text-align: center;
    }

    .game-card-body .status {
        font-size: 0.65rem;
    }

    .form-section {
        margin: 1.5rem auto;
        padding: 1.25rem;
    }

    .card {
        padding: 1.25rem;
    }

    .pricing-card {
        padding: 1.25rem;
        gap: 1.5rem;
    }

    .pricing-total {
        padding: 1.25rem;
    }

    .duration-options {
        flex-direction: column;
    }

    .duration-btn {
        min-width: 100%;
    }

    table {
        font-size: 0.78rem;
    }

    th, td {
        padding: 0.5rem 0.6rem;
    }

    details pre {
        font-size: 0.72rem;
    }

    .alert {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Footer */
footer {
    background: rgba(6, 8, 12, 0.92);
    border-top: 1px solid #0d1b2a;
    margin-top: 3rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-inner strong {
    color: #fff;
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
}

.footer-links a,
.footer-legal a {
    display: block;
    color: #8899aa;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: #fff;
    text-decoration: none;
}

.footer-brand p {
    color: #8899aa;
    font-size: 0.85rem;
    margin-top: 0.6rem;
}

.footer-bottom {
    border-top: 1px solid #0d1b2a;
    text-align: center;
    padding: 1rem;
    color: #667788;
    font-size: 0.8rem;
}

/* Section heading accent bars */
.pricing-page h2,
.form-section h2,
.dashboard h2,
.admin-dashboard h2 {
    background: linear-gradient(90deg, var(--accent), var(--accent-2)) left bottom / 3rem 2px no-repeat;
    padding-bottom: 0.5rem;
}

/* Dark scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #1b2838;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2a4a7f;
}
