/* Shared visual system for landing + app views */
:root {
    --primary: #74ACDF;
    --secondary: #003366;
    --navy: #0a192f;
    --background-light: #fcfcfd;
    --chat-bg: #f8fafc;
    --surface-green-start: #075712;
    --surface-green-mid: #0d3d08;
    --surface-green-end: #011a04;
}

html,
body {
    margin: 0;
    padding: 0;
}

.et-route-loader {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    width: 100%;
    height: 6px;
    pointer-events: none;
    opacity: 0;
    overflow: visible;
    background: #1f8f4e;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.22), 0 0 18px rgba(31, 143, 78, 0.38);
    transition: opacity 80ms ease;
}

.et-route-loader::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 50%, #ffffff 0 32%, transparent 34%),
        conic-gradient(from 45deg, #0f172a 0 12%, #ffffff 12% 24%, #0f172a 24% 36%, #ffffff 36% 48%, #0f172a 48% 60%, #ffffff 60% 72%, #0f172a 72% 84%, #ffffff 84% 100%);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 3px 14px rgba(15, 23, 42, 0.32);
    transform: translate(-120%, -50%);
    animation: etRouteLoaderBall 980ms ease-in-out infinite;
}

.et-route-loader::after {
    content: "";
    position: absolute;
    inset: 0;
    width: 42%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.86), transparent);
    filter: blur(1px);
    transform: translateX(-120%);
    animation: etRouteLoaderSweep 920ms ease-in-out infinite;
}

.et-route-loader.is-visible {
    opacity: 1;
}

.et-mobile-bottom-nav {
    position: fixed !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
}

.et-mobile-bottom-nav * {
    animation: none !important;
    transition: none !important;
}

.et-mobile-bottom-nav-preserved,
body.et-navigating .et-mobile-bottom-nav,
body.et-page-leaving .et-mobile-bottom-nav,
body.et-page-entering .et-mobile-bottom-nav,
body.et-page-ready .et-mobile-bottom-nav {
    top: auto !important;
    bottom: 0 !important;
    transform: none !important;
}

.et-mobile-bottom-nav-preserved {
    transition: none !important;
}

body.et-page-leaving main,
body.et-page-leaving > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
body.et-page-leaving footer {
    opacity: 0.94;
    transform: translateY(-4px);
    transition: opacity 140ms ease, transform 140ms ease;
}

body.et-route-backward.et-page-leaving main,
body.et-route-backward.et-page-leaving > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
body.et-route-backward.et-page-leaving footer {
    transform: translateY(4px);
}

body.et-page-entering main,
body.et-page-entering > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
body.et-page-entering footer {
    opacity: 0.94;
    transform: translateY(4px);
    transition: opacity 140ms ease, transform 140ms ease;
}

body.et-route-backward.et-page-entering main,
body.et-route-backward.et-page-entering > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
body.et-route-backward.et-page-entering footer {
    transform: translateY(-4px);
}

body.et-page-ready main,
body.et-page-ready > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
body.et-page-ready footer {
    position: relative;
    z-index: 1;
    opacity: 1;
    transform: none;
    transition: opacity 150ms ease, transform 150ms ease;
}

.et-background-fade {
    display: none;
}

.et-background-fade.is-fading {
    opacity: 0;
}

.is-route-pending {
    opacity: 0.78;
    position: relative;
}

.is-route-pending::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.35rem;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.75;
    transform: translateX(-50%) scale(0.8);
    animation: etRoutePendingPulse 700ms ease-in-out infinite;
}

.et-football-spinner {
    display: inline-block;
    width: 0.85em;
    height: 0.85em;
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 50%, #ffffff 0 30%, transparent 32%),
        conic-gradient(from 45deg, #0f172a 0 12%, #ffffff 12% 24%, #0f172a 24% 36%, #ffffff 36% 48%, #0f172a 48% 60%, #ffffff 60% 72%, #0f172a 72% 84%, #ffffff 84% 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65);
    vertical-align: -0.08em;
    animation: etFootballSpin 760ms linear infinite;
}

.is-reaction-loading {
    cursor: wait;
    opacity: 0.75;
    transform: scale(0.98);
}

.is-reaction-bump {
    animation: etReactionBump 180ms ease-out;
}

.et-message-skeleton {
    min-height: 6.75rem;
    background: #ffffff;
}

.et-message-skeleton .et-skeleton-avatar,
.et-message-skeleton .et-skeleton-line {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}

.et-message-skeleton .et-skeleton-avatar::after,
.et-message-skeleton .et-skeleton-line::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    animation: etSkeletonShimmer 1050ms ease-in-out infinite;
}

@keyframes etRouteLoaderBall {
    from { transform: translate(-120%, -50%) rotate(0deg); }
    to { transform: translate(calc(100vw + 120%), -50%) rotate(720deg); }
}

@keyframes etRouteLoaderSweep {
    from { transform: translateX(-120%); }
    to { transform: translateX(260%); }
}

@keyframes etRoutePendingPulse {
    0%, 100% { opacity: 0.35; transform: translateX(-50%) scale(0.72); }
    50% { opacity: 0.9; transform: translateX(-50%) scale(1); }
}

@keyframes etFootballSpin {
    to { transform: rotate(360deg); }
}

@keyframes etReactionBump {
    0% { transform: scale(1); }
    45% { transform: scale(1.14); }
    100% { transform: scale(1); }
}

@keyframes etSkeletonShimmer {
    to { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
    .et-route-loader,
    .et-route-loader::before,
    .et-route-loader::after,
    .is-route-pending::after,
    .et-football-spinner,
    .is-reaction-bump,
    .et-message-skeleton .et-skeleton-avatar::after,
    .et-message-skeleton .et-skeleton-line::after,
    .et-background-fade,
    body.et-page-leaving main,
    body.et-page-leaving > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
    body.et-page-leaving footer,
    body.et-route-backward.et-page-leaving main,
    body.et-route-backward.et-page-leaving > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
    body.et-route-backward.et-page-leaving footer,
    body.et-page-entering main,
    body.et-page-entering > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
    body.et-page-entering footer,
    body.et-route-backward.et-page-entering main,
    body.et-route-backward.et-page-entering > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
    body.et-route-backward.et-page-entering footer,
    body.et-page-ready main,
    body.et-page-ready > section:not(.et-mobile-nav-sheet):not([data-et-fixed-chrome]),
    body.et-page-ready footer {
        animation: none !important;
        transition-duration: 1ms !important;
        transform: none !important;
    }
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #334155;
}

.chat-bubble-left {
    border-bottom-left-radius: 4px;
}

.chat-bubble-right {
    border-bottom-right-radius: 4px;
}

.chat-container-height {
    height: calc(100vh - 200px);
    min-height: 560px;
}

.panel-card {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.06);
}

.chat-shell {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-headline {
    letter-spacing: -0.01em;
}

.dark .panel-card,
.dark .chat-shell {
    background: #0f172a;
    border-color: #334155;
}

@media (max-width: 768px) {
    .chat-container-height {
        height: calc(100dvh - 88px);
        min-height: calc(100dvh - 88px);
    }
}

/* Modal/Auth shared */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(4px);
}

.modal-overlay.modal-open {
    display: flex;
}

.modal-shell {
    width: 100%;
    max-width: 28rem;
    max-height: min(92vh, 760px);
    margin: 0 1rem;
    overflow-y: auto;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.18);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--navy);
}

.modal-close {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    color: #64748b;
    transition: all 120ms ease;
}

.modal-close:hover {
    color: #0f172a;
    background: #f1f5f9;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #94a3b8;
}

.auth-tab-active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.modal-form {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #475569;
}

.input-base {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    color: #0f172a;
}

.input-base:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(116, 172, 223, 0.22);
}

.btn-primary {
    width: 100%;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn-primary:hover {
    filter: brightness(0.95);
}

.et-auth-modal {
    --primary: #1f8f4e;
    --color-primary: 31 143 78;
}

.et-auth-modal .auth-tab-active {
    color: #1f8f4e;
    border-bottom-color: #1f8f4e;
}

.et-auth-modal .input-base:focus {
    border-color: #1f8f4e;
    box-shadow: 0 0 0 3px rgba(31, 143, 78, 0.18);
}

.et-auth-modal .btn-primary {
    background: #1f8f4e;
}

.supporter-club-option {
    border-radius: 0.75rem;
    border: 2px solid transparent;
    background: #f8fafc;
    transition: all 120ms ease;
}

.supporter-club-option:hover {
    border-color: rgba(116, 172, 223, 0.45);
}

.dark .modal-shell {
    border-color: #334155;
    background: #0f172a;
}

.dark .modal-header,
.dark .auth-tabs {
    border-color: #334155;
}

.dark .modal-title {
    color: #f8fafc;
}

.dark .modal-close {
    color: #cbd5e1;
}

.dark .modal-close:hover {
    color: #fff;
    background: #1e293b;
}

.dark .form-label {
    color: #cbd5e1;
}

.dark .input-base {
    border-color: #334155;
    background: #1e293b;
    color: #f8fafc;
}

.dark .auth-tab {
    color: #94a3b8;
}

.dark .supporter-club-option {
    background: #1e293b;
}

/* Streak leaderboard */
.streak-hero {
    border: 1px solid #dbeafe;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.06);
    padding: 1rem;
}

.streak-hero-copy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.streak-hero h1 {
    margin-top: 0.1rem;
    color: var(--navy);
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.streak-hero p {
    margin-top: 0.35rem;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.3;
}

.streak-hero-total {
    flex: 0 0 auto;
    min-width: 4.25rem;
    text-align: right;
}

.streak-hero-total span {
    display: block;
    color: #1f8f4e;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1;
}

.streak-hero-total small {
    display: block;
    margin-top: 0.22rem;
    color: #64748b;
    font-size: 0.58rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.streak-ranking {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(2, 6, 23, 0.06);
}

.streak-desktop-table {
    display: none;
}

.streak-desktop-table table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.streak-desktop-table th {
    padding: 0.8rem 1.25rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-align: left;
    text-transform: uppercase;
}

.streak-desktop-table td {
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid #eef2f7;
    vertical-align: middle;
}

.streak-desktop-table th:last-child,
.streak-desktop-table td:last-child {
    text-align: right;
}

.streak-desktop-table tbody tr:last-child td {
    border-bottom: 0;
}

.streak-desktop-table tbody tr:hover {
    background: #f8fafc;
}

.streak-col-rank {
    width: 5.5rem;
}

.streak-col-streak {
    width: 7rem;
}

.streak-align-right {
    text-align: right !important;
}

.streak-rank-pill {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #f1f5f9;
    color: var(--navy);
    font-size: 0.8rem;
    font-weight: 900;
}

.streak-rank-pill.is-top {
    background: #1f8f4e;
    color: #fff;
}

.streak-user-cell {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
}

.streak-badge {
    display: flex;
    width: 2.45rem;
    height: 2.45rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.22rem;
}

.streak-user-copy {
    min-width: 0;
}

.streak-username,
.streak-team {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.streak-username {
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 900;
}

.streak-team {
    margin-top: 0.12rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
}

.streak-days {
    display: inline-block;
    color: #1f8f4e;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

.streak-days-label {
    display: block;
    margin-top: 0.1rem;
    color: #94a3b8;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.streak-date,
.streak-comments {
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}

.streak-mobile-list {
    display: block;
}

.streak-card {
    padding: 0.82rem 0.9rem;
    border-bottom: 1px solid #eef2f7;
}

.streak-card:last-child {
    border-bottom: 0;
}

.streak-card-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
}

.streak-card-days {
    min-width: 3rem;
    text-align: right;
}

.streak-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 750;
}

.streak-card-meta strong {
    color: #0f172a;
    font-weight: 900;
}

@media (min-width: 768px) {
    .streak-desktop-table {
        display: block;
    }

    .streak-mobile-list {
        display: none;
    }
}

@media (max-width: 420px) {
    .streak-hero {
        padding: 0.85rem;
    }

    .streak-hero-copy {
        gap: 0.75rem;
    }

    .streak-hero h1 {
        font-size: 1.42rem;
    }

    .streak-hero p {
        max-width: 13.5rem;
        font-size: 0.76rem;
    }

    .streak-hero-total {
        min-width: 3.65rem;
    }

    .streak-hero-total span {
        font-size: 1.35rem;
    }

    .streak-card {
        padding: 0.75rem 0.8rem;
    }

    .streak-rank-pill {
        width: 2rem;
        height: 2rem;
        font-size: 0.72rem;
    }

    .streak-badge {
        width: 2.25rem;
        height: 2.25rem;
    }
}
