@import url("portal.css");

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(41, 182, 246, 0.22), transparent 28%),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.2), transparent 24%),
        linear-gradient(180deg, #07111f 0%, #0d1b2a 58%, #12263a 100%);
    color: #f8fafc;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 16px 24px 0;
}

.site-nav {
    width: min(1520px, 100%);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px 18px;
    border-radius: 24px;
    background: rgba(8, 15, 29, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.site-brand-block {
    display: grid;
    gap: 4px;
    min-width: max-content;
}

.site-brand {
    color: #f8fafc;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-brand-context {
    color: #8fb3d9;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    flex: 1;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 10px;
    align-items: center;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 999px;
    color: #dbeafe;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    background: rgba(28, 51, 82, 0.58);
    border: 1px solid transparent;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
    background: rgba(47, 84, 128, 0.78);
}

.nav-link.active {
    color: #08101e;
    background: linear-gradient(135deg, #a7f3d0 0%, #67e8f9 100%);
    border-color: rgba(255, 255, 255, 0.45);
}

.nav-menu {
    position: relative;
}

.nav-menu-button {
    appearance: none;
    cursor: pointer;
}

.nav-submenu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 10px;
    border-radius: 18px;
    background: rgba(8, 15, 29, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    display: none;
    z-index: 30;
}

.nav-menu:hover .nav-submenu,
.nav-menu:focus-within .nav-submenu {
    display: grid;
    gap: 8px;
}

.nav-submenu-link {
    padding: 10px 14px;
    border-radius: 12px;
    color: #dbeafe;
    text-decoration: none;
    font-weight: 700;
    background: rgba(28, 51, 82, 0.42);
}

.nav-submenu-link:hover {
    background: rgba(47, 84, 128, 0.78);
}

.nav-submenu-link.active {
    color: #08101e;
    background: linear-gradient(135deg, #a7f3d0 0%, #67e8f9 100%);
}

.page-loading-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(4, 10, 20, 0.62);
    backdrop-filter: blur(6px);
    z-index: 1000;
}

.page-loading-overlay.visible {
    display: flex;
}

.page-loading-card {
    min-width: 220px;
    padding: 24px 28px;
    border-radius: 24px;
    background: rgba(8, 15, 29, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    text-align: center;
}

.page-loading-card p {
    margin: 14px 0 0;
    color: #dbeafe;
    font-weight: 700;
}

.page-loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto;
    border-radius: 999px;
    border: 4px solid rgba(167, 243, 208, 0.22);
    border-top-color: #67e8f9;
    animation: portal-spin 0.8s linear infinite;
}

@keyframes portal-spin {
    to {
        transform: rotate(360deg);
    }
}

.container {
    text-align: center;
    color: white;
    max-width: 600px;
    width: 100%;
}

.title {
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: bold;
    margin: 0 0 20px;
}

h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.sports-grid {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 30px;
}

.game-modes {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.sport-button,
.game-button {
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: bold;
    padding: 15px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sport-button {
    background: linear-gradient(to bottom, #d4d4d4, #a9a9a9);
    color: black;
}

.sport-button:hover {
    background: linear-gradient(to bottom, #c0c0c0, #8f8f8f);
    transform: translateY(-2px);
}

.selected-sport {
    background-color: #4CAF50; /* Green */
    color: white;
    border: 2px solid #4CAF50;
}

.game-button {
    background: linear-gradient(to bottom, #4c9eff, #0064d3);
    color: white;
    width: min(240px, 100%);
}

.game-button:hover {
    background: linear-gradient(to bottom, #3a8be0, #0056b3);
    transform: translateY(-2px);
}

.game-button.start-button {
    background: rgba(28, 51, 82, 0.58);
    color: #dbeafe;
    border: 1px solid rgba(255, 255, 255, 0.45);
    width: 60%;
}

.game-button.start-button:hover {
    background: rgba(47, 84, 128, 0.78);
    transform: translateY(-1px);
}

.game-button.start-button:active {
    background: rgba(47, 84, 128, 0.88);
}

.game-button.how-to-play {
    background: linear-gradient(to bottom, #ff4d4d, #c90000);
}

.game-button.how-to-play:hover {
    background: linear-gradient(to bottom, #e04343, #b00000);
}

.landing-shell {
    min-height: calc(100vh - 110px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 36px 24px 56px;
    box-sizing: border-box;
}

.landing-card,
.start-card {
    width: min(1100px, 100%);
    padding: 36px;
    border-radius: 32px;
    background: rgba(8, 15, 29, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.22);
}

.start-card {
    width: min(760px, 100%);
    padding: 40px 36px;
    border-radius: 32px;
    background: rgba(7, 18, 34, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
    text-align: center;
}

.start-card > * {
    margin-left: auto;
    margin-right: auto;
}

.start-card h1 {
    margin: 14px auto 12px;
    max-width: 640px;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    line-height: 1.05;
}

.start-card .hero-copy {
    max-width: 620px;
    margin-bottom: 0;
}

.start-copy-stack {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.start-mode-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(15, 32, 56, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.start-feature-grid {
    width: min(100%, 620px);
    margin: 28px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    text-align: left;
}

.start-feature-card {
    padding: 18px 18px 16px;
    border-radius: 20px;
    background: rgba(15, 32, 56, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.start-feature-card strong {
    display: block;
    margin-bottom: 6px;
    color: #f8fafc;
    font-size: 0.95rem;
}

.start-feature-card span {
    color: #bfdbfe;
    line-height: 1.55;
    font-size: 0.92rem;
}

.start-actions {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.start-actions .game-button.start-button,
.zen-form .game-button.start-button {
    width: min(280px, 100%);
    min-height: 54px;
    border-radius: 16px;
    box-shadow: 0 16px 32px rgba(15, 118, 110, 0.28);
}

.landing-card {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.landing-card-single {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
}

.landing-card-leaderboard {
    width: min(1480px, 100%);
    padding-bottom: 52px;
}

.home-lane {
    min-width: 0;
}

.home-lane-play {
    width: min(100%, 760px);
}

.landing-card-leaderboard .home-lane-play {
    width: min(100%, 1320px);
}

.landing-card-single .home-lane-play {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.landing-copy {
    max-width: 560px;
}

.hero-copy {
    line-height: 1.7;
    color: #dbeafe;
}

.section-header {
    margin: 24px 0 14px;
}

.game-launcher {
    display: grid;
    width: min(360px, 100%);
    justify-items: center;
}

.home-page .game-launcher .game-button {
    width: min(240px, 100%);
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(28, 51, 82, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #dbeafe;
    box-shadow: none;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.home-page .game-launcher .game-button:hover {
    transform: translateY(-1px);
    background: rgba(47, 84, 128, 0.78);
}

.team-portal-callout {
    padding: 24px;
    border-radius: 24px;
    background: rgba(15, 32, 56, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.team-portal-callout p {
    color: #dbeafe;
    line-height: 1.6;
}

.flash-messages {
    width: min(520px, 100%);
    margin: 0 auto;
    background: rgba(127, 29, 29, 0.28);
    color: #fee2e2;
    padding: 14px 18px;
    border: 1px solid rgba(248, 113, 113, 0.28);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    font-size: 16px;
}

.zen-start-card {
    width: min(720px, 100%);
}

.zen-form {
    width: min(520px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    margin-top: 28px;
}

.dropdown-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: left;
}

.dropdown-container label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #99f6e4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dropdown-container select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 14px 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.7);
    color: #f8fafc;
    font-size: 16px;
    font-family: inherit;
    box-shadow: none;
    cursor: pointer;
    transition: border 0.2s, box-shadow 0.2s, transform 0.2s;
}

.dropdown-container select:hover,
.dropdown-container select:focus {
    border-color: rgba(103, 232, 249, 0.72);
    box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.16);
    outline: none;
}

.home-lane-business h2 {
    margin-top: 0;
}

.info-panel {
    width: min(520px, 100%);
    margin-top: 32px;
    padding: 24px;
    border-radius: 24px;
    background: rgba(15, 32, 56, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.info-panel h2 {
    margin-top: 0;
}

.info-panel p {
    color: #dbeafe;
    line-height: 1.7;
}

.landing-card-single .info-panel {
    text-align: left;
}

.leaderboard-panel-shell {
    width: min(100%, 1320px);
    margin-top: 32px;
    text-align: left;
}

.leaderboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.leaderboard-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 12px 18px;
    border-radius: 16px;
    color: #dbeafe;
    text-decoration: none;
    font-weight: 700;
    background: rgba(28, 51, 82, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.leaderboard-tab:hover {
    transform: translateY(-1px);
    background: rgba(47, 84, 128, 0.78);
}

.leaderboard-tab.active {
    color: #08101e;
    background: linear-gradient(135deg, #a7f3d0 0%, #67e8f9 100%);
    border-color: rgba(255, 255, 255, 0.45);
}

.leaderboard-meta {
    margin: 16px 0 0;
    color: #cbd5e1;
    font-size: 0.98rem;
}

.leaderboard-refresh-banner {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(103, 232, 249, 0.14);
    border: 1px solid rgba(103, 232, 249, 0.28);
    color: #dff9ff;
    font-weight: 700;
}

.leaderboard-refresh-banner.hidden {
    display: none;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.leaderboard-card {
    min-width: 0;
    padding: 22px;
    border-radius: 24px;
    background: rgba(15, 32, 56, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.leaderboard-card-header h2 {
    margin: 6px 0 0;
}

.leaderboard-card .eyebrow {
    margin: 0;
}

.leaderboard-list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.leaderboard-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(28, 51, 82, 0.42);
}

.leaderboard-rank {
    color: #8fb3d9;
    font-weight: 800;
}

.leaderboard-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.leaderboard-score {
    font-weight: 800;
    color: #a7f3d0;
}

.leaderboard-empty {
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(28, 51, 82, 0.32);
    color: #dbeafe;
    line-height: 1.6;
}

.rules-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.rules-shared-card {
    margin-top: 18px;
}

.rules-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.rules-list {
    margin: 18px 0 0;
    padding-left: 20px;
    color: #dbeafe;
    line-height: 1.6;
    display: grid;
    gap: 12px;
}

.rules-list li {
    padding-left: 2px;
}

.contact-panel {
    width: min(100%, 860px);
    margin-top: 32px;
}

.contact-card {
    padding: 28px;
    border-radius: 24px;
    background: rgba(15, 32, 56, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    text-align: left;
}

.contact-card-copy h2 {
    margin-top: 0;
    margin-bottom: 12px;
}

.contact-card-copy p {
    margin: 0 0 18px;
    color: #dbeafe;
    line-height: 1.6;
}

.contact-form {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.contact-field {
    display: grid;
    gap: 8px;
}

.contact-field.hidden {
    display: none;
}

.contact-field label {
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 700;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.32);
    background: rgba(8, 15, 29, 0.68);
    color: #f8fafc;
    font: inherit;
}

.contact-field textarea {
    min-height: 160px;
    resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
    color: #8fb3d9;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: none;
    border-color: rgba(103, 232, 249, 0.65);
    box-shadow: 0 0 0 3px rgba(103, 232, 249, 0.12);
}

.contact-submit {
    width: min(260px, 100%);
    justify-self: center;
}

.secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 14px 20px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #f8fafc;
    text-decoration: none;
    font-weight: 700;
    background: rgba(28, 51, 82, 0.52);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.secondary-link:hover {
    transform: translateY(-1px);
    background: rgba(47, 84, 128, 0.78);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow: auto;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: #333;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    max-height: 80%;
    overflow-y: auto;
}

.close-button {
    background: #ff4d4d;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 15px;
    cursor: pointer;
}

.close-button:hover {
    background: #e04343;
}



@media (max-width: 768px) {
    .site-header {
        padding: 12px 12px 0;
    }

    .site-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-links {
        justify-content: flex-start;
    }

    .landing-shell {
        align-items: stretch;
        padding: 16px;
    }

    .landing-card,
    .start-card {
        padding: 24px;
        border-radius: 24px;
    }

    .start-card h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

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

    .start-feature-grid {
        grid-template-columns: 1fr;
    }

    .leaderboard-grid {
        grid-template-columns: 1fr;
    }

    .rules-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
    }

    .game-modes {
        gap: 10px;
    }

    .game-button {
        font-size: 0.9rem;
        width: 100%;
    }
}
