:root {
    --primary: #005492;
    --primary-deep: #00375f;
    --primary-soft: #0b76c8;
    --accent: #d3b06d;
    --accent-soft: #f6e7c7;
    --surface: #f4f8fc;
    --surface-strong: #edf3f8;
    --ink: #07131f;
    --muted: #5e7285;
    --line: rgba(7, 19, 31, 0.1);
    --white: #ffffff;
    --shadow: 0 30px 70px rgba(0, 42, 75, 0.18);
    --radius: 28px;
    --radius-sm: 18px;
    --container: min(1180px, calc(100vw - 32px));
    --header-height: 88px;
    --transition: 280ms cubic-bezier(.2, .8, .2, 1);
}

@font-face {
    font-family: 'FIFA Welcome';
    src: url('../fonts/FIFAWELCOME.woff2') format('woff2');
    font-display: swap;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(11, 118, 200, 0.12), transparent 34%),
        radial-gradient(circle at bottom right, rgba(211, 176, 109, 0.16), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, #f5f8fb 52%, #edf4fa 100%);
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

textarea {
    resize: vertical;
}

.container {
    width: var(--container);
    margin: 0 auto;
}

.aksa-display,
.brand-mark,
.hero-copy h1,
.section-head h2,
.subhero-card h1,
.not-found-card h1 {
    font-family: 'FIFA Welcome', 'Teko', 'Arial Narrow', sans-serif;
    letter-spacing: 0.04em;
}

.site-shell {
    padding-top: var(--header-height);
    overflow-x: hidden;
    overflow-y: visible;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 30;
    backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: var(--header-height);
}

[id] {
    scroll-margin-top: calc(var(--header-height) + 16px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(0, 84, 146, 0.2);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-copy span {
    color: var(--muted);
    font-size: 0.9rem;
}

.brand-mark {
    font-size: 2rem;
    line-height: 1;
    color: var(--primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav a,
.lang-switch a {
    position: relative;
    color: var(--muted);
    transition: color var(--transition);
}

.nav a::after,
.lang-switch a::after,
.social-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--primary-soft));
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform var(--transition);
}

.nav a:hover,
.nav a:focus-visible,
.lang-switch a:hover,
.lang-switch a.active,
.social-links a:hover {
    color: var(--ink);
}

.nav a:hover::after,
.nav a:focus-visible::after,
.lang-switch a:hover::after,
.lang-switch a.active::after,
.social-links a:hover::after {
    transform: scaleX(1);
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.mobile-lang-switch {
    display: none;
}

.menu-toggle {
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--ink);
    transition: transform var(--transition), opacity var(--transition);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 18px 30px rgba(0, 84, 146, 0.2);
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 22px 38px rgba(0, 84, 146, 0.26);
    filter: brightness(1.03);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    transform: none;
    box-shadow: none;
    filter: none;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.82);
    color: var(--primary-deep);
    border-color: rgba(0, 84, 146, 0.14);
    box-shadow: none;
}

.button-ghost {
    background: transparent;
    color: #b64242;
    border-color: rgba(182, 66, 66, 0.18);
    box-shadow: none;
}

.eyebrow,
.pill,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 84, 146, 0.09);
    color: var(--primary-deep);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pill.light,
.badge.success {
    background: rgba(211, 176, 109, 0.16);
    color: #835d18;
}

.hero-section {
    position: relative;
    padding: 48px 0 78px;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 20%, rgba(11, 118, 200, 0.22), transparent 22%),
        radial-gradient(circle at 24% 24%, rgba(211, 176, 109, 0.18), transparent 20%);
    pointer-events: none;
}

.hero-grid,
.join-grid,
.section-grid,
.register-layout,
.admin-grid.two-col {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-copy h1 {
    font-size: clamp(3.2rem, 8vw, 6.2rem);
    line-height: 0.95;
    margin: 18px 0;
}

.hero-copy p,
.section-head p,
.section-copy p,
.president-copy p,
.tournament-copy p,
.subhero-card p {
    color: var(--muted);
    line-height: 1.7;
    font-size: 1.03rem;
}

.hero-actions,
.quick-links,
.inline-filter,
.admin-item-actions,
.subhero-meta,
.hero-panel-top,
.hero-scoreboard,
.detail-grid,
.member-list-admin {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-stats,
.stats-grid,
.feature-cards,
.tournament-grid,
.footer-grid,
.gallery-grid,
.thumb-grid {
    display: grid;
    gap: 18px;
}

.hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
}

.stat-card,
.stat-box,
.feature-card,
.join-card,
.register-card,
.register-info,
.subhero-card,
.not-found-card,
.hero-panel,
.admin-section-card,
.team-card,
.gallery-card,
.tournament-card,
.president-card,
.admin-item-card,
.thumb-card,
.admin-login-card {
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
}

.stat-card,
.stat-box {
    padding: 18px;
}

.stat-card strong,
.stat-box strong {
    display: block;
    font-size: 2rem;
    color: var(--primary);
}

.hero-visual {
    position: relative;
    min-height: 520px;
}

.hero-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(100%, 520px);
    padding: 28px;
    overflow: hidden;
}

.hero-orbit {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(0, 84, 146, 0.18);
    animation: spin 24s linear infinite;
}

.orbit-one {
    width: 360px;
    height: 360px;
    right: 80px;
    top: 30px;
}

.orbit-two {
    width: 210px;
    height: 210px;
    right: 0;
    top: 120px;
    animation-direction: reverse;
    animation-duration: 16s;
}

.hero-scoreboard {
    justify-content: space-between;
    margin: 34px 0 26px;
}

.hero-scoreboard div {
    padding: 16px 18px;
    background: rgba(0, 84, 146, 0.08);
    border-radius: 20px;
    min-width: 120px;
}

.hero-scoreboard span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
}

.hero-scoreboard strong {
    font-size: 1.3rem;
}

.hero-lines {
    display: grid;
    gap: 10px;
}

.hero-lines span {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(0, 84, 146, 0.2), rgba(211, 176, 109, 0.6));
    animation: pulseWidth 4s ease-in-out infinite;
}

.hero-lines span:nth-child(2) {
    animation-delay: 0.7s;
}

.hero-lines span:nth-child(3) {
    animation-delay: 1.4s;
}

.section {
    padding: 88px 0;
}

.section-contrast {
    background: linear-gradient(180deg, rgba(0, 84, 146, 0.045), rgba(255, 255, 255, 0.2));
}

.section-head {
    max-width: 760px;
    margin-bottom: 28px;
}

.section-head h2,
.section-copy h2,
.president-copy h3,
.tournament-copy h3,
.admin-topbar h1,
.admin-section-card h2,
.admin-login-card h1,
.register-card h2,
.subhero-card h1,
.not-found-card h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 0.98;
    margin: 14px 0;
}

.feature-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card,
.join-card,
.register-card,
.admin-section-card,
.admin-login-card {
    padding: 24px;
}

.about-grid {
    align-items: start;
}

.muted,
.back-link,
.meta-list span,
.tournament-copy li span,
.admin-topbar p,
small {
    color: var(--muted);
}

.president-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
    padding: 26px;
    margin-bottom: 28px;
}

.president-photo-wrap,
.tournament-poster,
.gallery-card-media,
.register-info,
.thumb-card,
.admin-thumb {
    overflow: hidden;
    border-radius: calc(var(--radius) - 8px);
}

.president-photo,
.gallery-card img,
.tournament-card img,
.register-info img,
.admin-thumb,
.thumb-card img,
.gallery-detail-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms cubic-bezier(.2, .8, .2, 1);
}

.president-card:hover .president-photo,
.gallery-card:hover img,
.tournament-card:hover img,
.gallery-detail-card:hover img,
.thumb-card:hover img {
    transform: scale(1.05);
}

.lead {
    color: var(--primary);
    font-weight: 700;
}

.team-groups {
    display: grid;
    gap: 28px;
}

.team-group {
    display: grid;
    gap: 14px;
}

.team-group h3 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.team-group-list {
    position: relative;
    border-radius: 20px;
}

.team-group-track {
    display: grid;
    align-items: stretch;
    gap: 18px;
}

.team-group-list.is-scrollable {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 6px 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    cursor: grab;
    touch-action: pan-x;
}

.team-group-list.is-scrollable::-webkit-scrollbar {
    display: none;
}

.team-group-list.is-scrollable:active {
    cursor: grabbing;
}

.team-group-list.is-scrollable .team-group-track {
    display: flex;
    width: max-content;
}

.team-group-track .team-card {
    width: auto;
    min-width: 0;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.74));
    box-shadow: 0 18px 36px rgba(0, 42, 75, 0.12);
    transition: transform 260ms cubic-bezier(.2, .8, .2, 1), box-shadow 260ms cubic-bezier(.2, .8, .2, 1);
}

.team-group-track .team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 44px rgba(0, 42, 75, 0.16);
}

.team-group-list.is-scrollable .team-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.team-card-static h3 {
    margin: 0 0 8px;
    line-height: 1.1;
}

.team-card-static p {
    margin: 0;
}

.team-group-track .team-card-static {
    animation: teamCardIn 620ms cubic-bezier(.2, .8, .2, 1) both;
}

.team-group-track .team-card-static:nth-child(2) {
    animation-delay: 60ms;
}

.team-group-track .team-card-static:nth-child(3) {
    animation-delay: 120ms;
}

.team-group-track .team-card-static:nth-child(4) {
    animation-delay: 180ms;
}

.team-card-horizontal {
    display: grid;
    grid-template-columns: 310px 1fr;
    gap: 20px;
    align-items: stretch;
}

.team-card-horizontal img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    margin-bottom: 0;
    border-radius: 18px;
}

.team-group-president .team-group-track {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
}

.team-group-president .team-group-list.is-scrollable .team-card {
    width: 780px;
}

.team-group-president .team-card {
    width: 100%;
}

.team-group-president .team-card-horizontal img {
    aspect-ratio: 1 / 1;
    height: auto;
}

.team-group-president .team-card-static h3 {
    font-size: clamp(2rem, 3vw, 2.5rem);
}

.team-group-president .team-card-static > div > p {
    font-size: 1.05rem;
}

.team-group-president .team-card-bio {
    font-size: 1.03rem;
}

.team-group-vice .team-group-track {
    grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
    width: 100%;
}

.team-group-vice .team-group-list.is-scrollable .team-card {
    width: 700px;
}

.team-group-vice .team-card {
    width: 100%;
}

.team-group-vice .team-card-static h3 {
    font-size: clamp(1.7rem, 2.7vw, 2.2rem);
}

.team-group-vice .team-card-horizontal {
    grid-template-columns: 280px 1fr;
}

.team-group-vice .team-card-horizontal img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
}

.team-group-vice .team-card-static > div > p {
    font-size: 1rem;
}

.team-group-heads .team-group-track {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    width: 100%;
}

.team-group-heads .team-group-list.is-scrollable .team-card {
    width: 285px;
}

.team-group-heads .team-card-static h3 {
    font-size: 1.2rem;
}

.team-group-heads .team-card-static img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
}

.team-group-members .team-group-track {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.team-group-members .team-group-list:not(.is-scrollable) {
    overflow: visible;
}

.team-group-members .team-group-list.is-scrollable {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}

.team-group-members .team-group-list.is-scrollable .team-card {
    width: 245px;
}

.team-group-members .team-group-list.is-scrollable .team-group-track {
    display: flex;
    width: max-content;
    gap: 18px;
}

.team-group-members .team-card-static h3 {
    font-size: 1.05rem;
}

.team-group-members .team-card-static > div > p {
    font-size: 0.95rem;
}

.team-group-members .team-card-static img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
}

.team-card-static img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 14px;
}

.team-card-bio {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

.team-veterans {
    margin-top: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.team-veterans .team-group-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-veterans-page .veterans-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.team-veterans-page .veteran-card-compact {
    width: 100%;
    min-width: 0;
    padding: 16px;
}

.team-veterans-page .veteran-card-compact img {
    aspect-ratio: 1 / 1;
    height: auto;
    margin-bottom: 14px;
}

.team-veterans-page .veteran-card-compact h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    line-height: 1.15;
}

.team-veterans-page .veteran-card-compact > div > p {
    font-size: 0.95rem;
}

.team-veterans-link {
    margin-top: 18px;
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.7);
    display: grid;
    gap: 10px;
}

.team-veterans-link h3 {
    margin: 0;
}

.team-veterans-link p {
    margin: 0;
    color: var(--muted);
}

.marquee {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.marquee[data-auto-scroll] {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.marquee[data-lock-scroll] {
    overflow: hidden;
    cursor: default;
}

.marquee[data-auto-scroll]::-webkit-scrollbar {
    display: none;
}

.marquee[data-auto-scroll]:active {
    cursor: grabbing;
}

.marquee[data-lock-scroll]:active {
    cursor: default;
}

.marquee[data-auto-scroll] .marquee-track {
    animation: none;
    padding-bottom: 4px;
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 20px;
    animation: marquee 34s linear infinite;
}

.marquee.slow .marquee-track {
    animation-duration: 42s;
}

.marquee-gallery .marquee-track {
    animation-duration: 52s;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-team .team-card,
.gallery-card {
    width: 286px;
    flex: 0 0 286px;
    padding: 16px;
}

.marquee-team .team-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    border-radius: 22px;
    margin-bottom: 16px;
}

.gallery-card-media {
    height: 220px;
    margin-bottom: 16px;
}

.gallery-card-copy {
    display: grid;
    gap: 10px;
}

.gallery-card-copy span {
    color: var(--primary);
    font-weight: 700;
}

.tournament-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tournament-card {
    overflow: hidden;
}

.tournament-poster {
    height: 280px;
}

.tournament-copy {
    padding: 22px;
}

.tournament-card-actions,
.class-pill-grid,
.admin-link-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.meta-list {
    list-style: none;
    margin: 18px 0 24px;
    padding: 0;
    display: grid;
    gap: 12px;
}

.meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.meta-list.compact {
    margin-bottom: 0;
}

.meta-list.compact li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.join-section {
    padding-bottom: 110px;
}

.join-card,
.register-card,
.admin-login-card {
    backdrop-filter: blur(16px);
}

.join-form,
.register-form,
.admin-form-grid {
    display: grid;
    gap: 16px;
}

.join-form label,
.register-form label,
.admin-form-grid label {
    display: grid;
    gap: 10px;
}

.join-form span,
.register-form span,
.admin-form-grid span {
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(0, 84, 146, 0.14);
    background: rgba(255, 255, 255, 0.94);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(11, 118, 200, 0.6);
    box-shadow: 0 0 0 4px rgba(11, 118, 200, 0.08);
}

.checkbox-line {
    display: flex !important;
    align-items: center;
    gap: 12px;
}

.checkbox-line input {
    width: auto;
}

.form-errors,
.form-success,
.closed-state,
.empty-state,
.admin-alert {
    padding: 16px 18px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.form-errors,
.admin-alert.error {
    background: rgba(182, 66, 66, 0.08);
    color: #8f2f2f;
}

.form-success,
.admin-alert.success {
    background: rgba(0, 84, 146, 0.08);
    color: var(--primary-deep);
}

.closed-state,
.empty-state {
    background: rgba(7, 19, 31, 0.05);
    color: var(--muted);
}

.site-footer {
    padding: 36px 0 30px;
    color: #dbe8f2;
    background: linear-gradient(180deg, #073253 0%, #02182b 100%);
}

.footer-grid {
    grid-template-columns: 1.2fr 1fr 0.7fr;
    align-items: start;
}

.footer-brand .brand-mark,
.site-footer h3,
.site-footer .brand-copy span,
.footer-slogan,
.footer-bottom p,
.social-links a,
.footer-lang a {
    color: inherit;
}

.social-links,
.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
}

.footer-bottom {
    justify-content: space-between;
    padding-top: 22px;
    margin-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.subhero-section,
.not-found-section,
.admin-login-wrap {
    padding: 72px 0;
}

.subhero-card,
.not-found-card,
.admin-login-card {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 34px;
}

.back-link {
    display: inline-flex;
    margin-bottom: 12px;
}

.subhero-meta {
    justify-content: center;
    margin-top: 18px;
}

.tournament-hero-card {
    max-width: none;
    text-align: left;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    align-items: center;
    gap: 28px;
}

.tournament-hero-card .subhero-meta {
    justify-content: flex-start;
}

.tournament-hero-media img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    border-radius: 24px;
}

.tournament-hero-actions {
    margin-top: 20px;
}

.tournament-detail-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tournament-content-card {
    padding: 28px;
}

.tournament-content-card h2 {
    margin: 14px 0 18px;
}

.tournament-richtext {
    color: var(--muted);
    line-height: 1.8;
}

.tournament-info-grid {
    align-items: stretch;
}

.tournament-bracket-card {
    display: grid;
    gap: 24px;
}

.tournament-bracket-image img {
    width: 100%;
    border-radius: 24px;
}

.player-stats-table-wrap,
.player-stats-admin-wrap {
    width: 100%;
    overflow-x: auto;
}

.player-stats-table,
.player-stats-admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.player-stats-table th,
.player-stats-table td,
.player-stats-admin-table th,
.player-stats-admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.player-stats-table th,
.player-stats-admin-table th {
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.player-stats-table tbody tr:hover {
    background: rgba(0, 84, 146, 0.04);
}

.player-stats-admin-table input {
    min-width: 78px;
    padding: 10px 12px;
    border-radius: 14px;
}

.player-stats-admin-table input[type="text"] {
    min-width: 140px;
}

.admin-subsection {
    display: grid;
    gap: 16px;
    padding: 22px;
    border: 1px solid rgba(0, 84, 146, 0.1);
    border-radius: 22px;
    background: rgba(0, 84, 146, 0.03);
}

.admin-subsection-head h3 {
    margin: 0 0 8px;
}

.is-hidden {
    display: none !important;
}

.admin-link-row {
    margin-top: 6px;
    color: var(--muted);
}

.admin-link-row a {
    color: var(--primary);
}

.gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-detail-card {
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gallery-detail-card img {
    aspect-ratio: 1 / 1;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(2, 24, 43, 0.92);
    display: grid;
    place-items: center;
    gap: 16px;
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 60;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox img {
    max-width: min(100%, 960px);
    max-height: 78vh;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.lightbox p,
.lightbox-close {
    color: var(--white);
}

.lightbox-close {
    position: absolute;
    top: 26px;
    right: 32px;
    font-size: 2rem;
    background: transparent;
    border: 0;
}

.admin-body {
    background: linear-gradient(180deg, #f2f7fb 0%, #e8f0f6 100%);
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.admin-sidebar {
    padding: 28px 20px;
    background: linear-gradient(180deg, #052b49 0%, #021628 100%);
    color: #dbe8f2;
    position: sticky;
    top: 0;
    height: 100vh;
}

.admin-sidebar-top {
    display: block;
}

.admin-brand {
    margin-bottom: 34px;
}

.admin-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    flex: 0 0 48px;
}

.admin-menu-toggle span {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform var(--transition), opacity var(--transition);
}

.admin-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.admin-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.admin-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

body.modal-open {
    overflow: hidden;
}

.admin-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.admin-confirm-modal[hidden] {
    display: none;
}

.admin-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 22, 38, 0.56);
    backdrop-filter: blur(4px);
}

.admin-confirm-card {
    position: relative;
    width: min(100%, 420px);
    padding: 28px;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(0, 84, 146, 0.12);
    box-shadow: 0 24px 80px rgba(8, 28, 54, 0.24);
}

.admin-confirm-card h2 {
    margin: 0 0 10px;
}

.admin-confirm-card p {
    margin: 0;
    color: var(--muted);
}

.admin-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.admin-nav {
    display: grid;
    gap: 10px;
}

.admin-nav a {
    padding: 14px 16px;
    border-radius: 18px;
    color: rgba(219, 232, 242, 0.82);
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(4px);
}

.admin-main {
    padding: 28px;
    min-width: 0;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 26px;
}

.admin-section-card {
    margin-bottom: 24px;
}

.admin-item-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
}

.admin-item-card.column {
    display: grid;
    justify-content: stretch;
}

.admin-item-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.admin-item-main.between,
.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-list {
    display: grid;
    gap: 16px;
}

.admin-thumb {
    width: 78px;
    height: 78px;
    border-radius: 20px;
}

.admin-thumb.poster {
    width: 72px;
    height: 96px;
}

.thumb-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    margin-top: 12px;
}

.thumb-card {
    padding: 12px;
}

.thumb-card img {
    height: 120px;
    border-radius: 14px;
    margin-bottom: 10px;
}

.quick-links,
.inline-filter {
    align-items: center;
}

.inline-filter select,
.inline-filter input {
    width: auto;
    min-width: 220px;
}

.admin-item-main > div,
.admin-item-actions,
.admin-section-head > div,
.quick-links > *,
.inline-filter > * {
    min-width: 0;
}

.admin-item-main h3,
.admin-item-main p,
.admin-item-main small,
.admin-section-head h2 {
    overflow-wrap: anywhere;
}

.detail-grid,
.member-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.admin-permission-note {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.6;
}

.member-row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.member-list-admin span {
    display: inline-flex;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(0, 84, 146, 0.08);
    color: var(--primary-deep);
}

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

.format-fields.visible {
    display: grid;
}

.not-found-body .site-header,
.admin-login-wrap .site-header {
    position: static;
}

.not-found-body .site-shell {
    padding-top: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulseWidth {
    0%,
    100% {
        width: 78%;
    }
    50% {
        width: 100%;
    }
}

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

@media (max-width: 1180px) {
    .tournament-grid,
    .feature-cards,
    .gallery-grid,
    .stats-grid,
    .tournament-detail-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-group-track,
    .team-group-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-group-president .team-group-track {
        grid-template-columns: minmax(0, 1fr);
    }

    .team-group-vice .team-group-track {
        grid-template-columns: minmax(0, 1fr);
    }

    .team-group-members .team-group-track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .team-group-heads .team-group-track,
    .team-veterans .team-group-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-veterans-page .veterans-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 35;
        height: auto;
        padding: 18px 16px;
    }

    .admin-sidebar-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
    }

    .admin-brand {
        margin-bottom: 0;
        min-width: 0;
    }

    .admin-menu-toggle {
        display: inline-flex;
    }

    .admin-nav {
        display: none;
        margin-top: 16px;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .admin-nav.is-open {
        display: grid;
    }
}

@media (max-width: 900px) {
    .team-group-heads,
    .team-group-members {
        display: none;
    }

    .nav {
        position: absolute;
        top: calc(100% + 12px);
        left: 16px;
        right: 16px;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(0, 84, 146, 0.08);
        border-radius: 24px;
        padding: 18px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        box-shadow: var(--shadow);
    }

    .nav.is-open {
        display: flex;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .hero-grid,
    .join-grid,
    .section-grid,
    .register-layout,
    .tournament-hero-card,
    .admin-grid.two-col,
    .footer-grid,
    .president-card,
    .detail-grid,
    .member-row,
    .member-grid,
    .format-fields {
        grid-template-columns: 1fr;
    }

    .hero-stats,
    .tournament-grid,
    .feature-cards,
    .gallery-grid,
    .stats-grid,
    .team-group-track,
    .team-group-grid {
        grid-template-columns: 1fr;
    }

    .team-group-members .team-group-track,
    .team-group-heads .team-group-track,
    .team-group-vice .team-group-track,
    .team-veterans .team-group-grid,
    .permissions-grid {
        grid-template-columns: 1fr;
    }

    .team-veterans-page .veterans-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 380px;
    }

    .hero-panel {
        position: relative;
        width: 100%;
        margin-top: 120px;
    }

    .orbit-one,
    .orbit-two {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .topbar,
    .admin-topbar,
    .admin-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-item-card,
    .admin-item-main.between {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-item-main {
        align-items: flex-start;
        width: 100%;
    }

    .admin-item-actions {
        width: 100%;
    }

    .admin-item-actions > *,
    .admin-item-actions form,
    .inline-filter,
    .inline-filter select,
    .inline-filter input {
        width: 100%;
    }

    .inline-filter select,
    .inline-filter input {
        min-width: 0;
    }

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

    .team-card-horizontal img {
        width: 100%;
        aspect-ratio: 1 / 1;
        min-height: 0;
        height: auto;
    }

    .team-group-president .team-card-horizontal,
    .team-group-vice .team-card-horizontal {
        grid-template-columns: 1fr;
    }

    .team-group-vice .team-card-horizontal img {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
    }
}

@media (max-width: 640px) {
    .topbar {
        min-height: 78px;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
        flex-direction: row;
    }

    .brand-copy span {
        display: none;
    }

    .brand {
        width: auto;
        gap: 12px;
        min-width: 0;
    }

    .brand-logo {
        width: 54px;
        height: 54px;
        flex-basis: 54px;
    }

    .brand-mark {
        font-size: 1.85rem;
    }

    .header-tools {
        width: auto;
        justify-content: flex-end;
        gap: 12px;
        margin-left: auto;
    }

    .header-tools .lang-switch {
        display: none;
    }

    .mobile-lang-switch {
        display: inline-flex;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid rgba(0, 84, 146, 0.1);
        gap: 14px;
    }

    .menu-toggle {
        width: 50px;
        height: 50px;
        border-radius: 18px;
        margin-left: 0;
    }

    .hero-copy h1,
    .section-head h2,
    .section-copy h2,
    .president-copy h3,
    .subhero-card h1,
    .not-found-card h1,
    .admin-login-card h1,
    .register-card h2 {
        font-size: clamp(2.2rem, 11vw, 3.2rem);
    }

    .section,
    .hero-section,
    .subhero-section,
    .admin-login-wrap,
    .not-found-section {
        padding: 64px 0;
    }

    .site-footer {
        padding-top: 28px;
    }

    .button,
    .button-secondary,
    .button-ghost {
        width: 100%;
    }

    .nav {
        top: calc(100% + 10px);
    }

    .hero-actions,
    .admin-item-actions,
    .quick-links,
    .inline-filter,
    .subhero-meta,
    .member-list-admin {
        flex-direction: column;
        align-items: stretch;
    }

    .team-card,
    .gallery-card {
        width: 240px;
        flex-basis: 240px;
    }

    .team-group-track .team-card {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .team-card-horizontal {
        gap: 14px;
    }

    .team-card-horizontal > div {
        min-width: 0;
    }

    .team-card-horizontal h3 {
        overflow-wrap: anywhere;
    }

    .gallery-card-media {
        height: 200px;
    }

    .lightbox {
        padding: 16px;
    }

    .admin-main {
        padding: 16px;
    }

    .admin-sidebar {
        padding: 14px 12px;
    }

    .admin-sidebar-top {
        gap: 12px;
    }

    .admin-nav {
        grid-template-columns: 1fr;
    }

    .admin-nav a {
        padding: 13px 14px;
    }

    .admin-item-card {
        padding: 16px;
    }

    .admin-thumb {
        width: 68px;
        height: 68px;
    }

    .admin-thumb.poster {
        width: 64px;
        height: 86px;
    }
}
