:root {
    --public-bg: #07111f;
    --public-panel: rgba(10, 21, 38, 0.82);
    --public-panel-solid: #0f1f35;
    --public-border: rgba(139, 170, 255, 0.18);
    --public-text: #eef5ff;
    --public-muted: #99abc9;
    --public-accent: #3ddc97;
    --public-accent-2: #ffb703;
    --public-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);

    --admin-bg: #eef3f8;
    --admin-panel: #ffffff;
    --admin-panel-2: #f7fafc;
    --admin-border: #d8e1ea;
    --admin-text: #132033;
    --admin-muted: #5f7187;
    --admin-accent: #0d6e6e;
    --admin-accent-2: #1640d6;
    --admin-shadow: 0 18px 46px rgba(31, 55, 80, 0.08);

    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-pill: 999px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Inter, system-ui, sans-serif;
    min-height: 100vh;
}

body.body-public {
    color: var(--public-text);
    background:
        radial-gradient(circle at top left, rgba(61, 220, 151, 0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(22, 64, 214, 0.24), transparent 28%),
        linear-gradient(180deg, #030814 0%, #091525 45%, #050b15 100%);
}

body.body-admin {
    color: var(--admin-text);
    background:
        radial-gradient(circle at top left, rgba(13, 110, 110, 0.06), transparent 20%),
        linear-gradient(180deg, #f4f8fb 0%, #eaf0f5 100%);
}

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

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

.container {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
}

.page-section {
    padding: 34px 0 56px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(16px);
}

.site-header-public {
    background: rgba(4, 9, 17, 0.78);
    border-bottom: 1px solid rgba(139, 170, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.site-header-admin {
    background: rgba(244, 248, 251, 0.92);
    border-bottom: 1px solid rgba(216, 225, 234, 0.9);
}

.nav-shell {
    min-height: 82px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

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

.brand > span {
    display: grid;
    gap: 2px;
}

.body-public .brand strong {
    letter-spacing: 0.01em;
}

.brand small {
    font-size: 0.9rem;
}

.body-public .brand small {
    color: var(--public-muted);
}

.body-admin .brand small {
    color: var(--admin-muted);
}

.brand-badge {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.body-public .brand-badge {
    color: #05111f;
    background: linear-gradient(135deg, var(--public-accent) 0%, #9ef7cf 100%);
    box-shadow: 0 0 0 1px rgba(61, 220, 151, 0.24), 0 16px 30px rgba(61, 220, 151, 0.22);
}

.body-admin .brand-badge {
    color: #fff;
    background: linear-gradient(135deg, var(--admin-accent-2) 0%, var(--admin-accent) 100%);
    box-shadow: var(--admin-shadow);
}

.top-nav,
.action-row,
.tag-row,
.split-checks,
.inline-form,
.section-head,
.player-head,
.hero-bullets,
.team-kpis {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.body-public .eyebrow {
    color: var(--public-accent);
}

.body-admin .eyebrow {
    color: var(--admin-accent);
}

.hero-clean {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 26px;
    align-items: stretch;
}

.hero-copy h1,
.draft-intro h1,
.form-card h1 {
    margin: 10px 0 16px;
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.body-public .hero-copy h1,
.body-public .draft-intro h1 {
    font-size: clamp(2.8rem, 6vw, 5.2rem);
}

.body-admin .form-card h1,
.body-admin .hero-copy h1 {
    font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.hero-copy p,
.muted {
    line-height: 1.65;
}

.body-public .hero-copy p,
.body-public .muted {
    color: var(--public-muted);
}

.body-admin .hero-copy p,
.body-admin .muted {
    color: var(--admin-muted);
}

.summary-panel,
.card,
.stat-card,
.country-card,
.player-card,
.roster-item {
    border-radius: var(--radius-xl);
}

.body-public .summary-panel,
.body-public .card,
.body-public .stat-card,
.body-public .country-card,
.body-public .player-card,
.body-public .roster-item {
    background: var(--public-panel);
    border: 1px solid var(--public-border);
    box-shadow: var(--public-shadow);
}

.body-admin .summary-panel,
.body-admin .card,
.body-admin .stat-card,
.body-admin .country-card,
.body-admin .player-card,
.body-admin .roster-item {
    background: var(--admin-panel);
    border: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow);
}

.summary-panel {
    padding: 28px;
    display: grid;
    gap: 16px;
}

.body-public .summary-panel {
    background: linear-gradient(180deg, rgba(14, 29, 51, 0.96) 0%, rgba(8, 18, 32, 0.92) 100%);
}

.body-admin .summary-panel {
    background: linear-gradient(180deg, #ffffff 0%, #f6fafc 100%);
}

.mini-stat {
    padding-bottom: 14px;
    border-bottom: 1px solid;
}

.body-public .mini-stat {
    border-color: rgba(139, 170, 255, 0.14);
}

.body-admin .mini-stat {
    border-color: var(--admin-border);
}

.mini-stat:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.mini-stat span,
.stat-card span {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
}

.body-public .mini-stat span,
.body-public .stat-card span {
    color: var(--public-muted);
}

.body-admin .mini-stat span,
.body-admin .stat-card span {
    color: var(--admin-muted);
}

.mini-stat strong,
.stat-card strong {
    font-size: 1.9rem;
    letter-spacing: -0.04em;
}

.simple-grid,
.admin-panels,
.country-grid,
.draft-board,
.player-grid {
    display: grid;
    gap: 20px;
}

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

.feature-card,
.card {
    padding: 26px;
}

.btn,
.link-chip,
.hero-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.btn:hover,
.link-chip:hover {
    transform: translateY(-2px);
}

.body-public .btn-primary {
    color: #041019;
    background: linear-gradient(135deg, var(--public-accent) 0%, #a0ffcf 100%);
    box-shadow: 0 14px 32px rgba(61, 220, 151, 0.24);
}

.body-admin .btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--admin-accent-2), var(--admin-accent));
}

.body-public .btn-secondary,
.body-public .link-chip {
    color: var(--public-text);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(139, 170, 255, 0.2);
}

.body-admin .btn-secondary,
.body-admin .link-chip {
    color: var(--admin-text);
    background: var(--admin-panel-2);
    border-color: var(--admin-border);
}

.link-chip.wide {
    width: 100%;
    justify-content: flex-start;
}

.badge,
.hero-chip {
    min-height: 34px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    font-size: 0.9rem;
    font-weight: 800;
}

.body-public .badge,
.body-public .hero-chip {
    color: var(--public-text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 170, 255, 0.16);
}

.body-admin .badge,
.body-admin .hero-chip {
    color: var(--admin-text);
    background: #fff;
    border: 1px solid var(--admin-border);
}

.badge-soft {
    font-weight: 800;
}

.body-public .badge-soft {
    color: #051019;
    background: linear-gradient(135deg, var(--public-accent-2), #ffd972);
    border-color: transparent;
}

.body-admin .badge-soft {
    background: rgba(13, 110, 110, 0.1);
    color: var(--admin-accent);
    border-color: rgba(13, 110, 110, 0.14);
}

.alert {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid;
}

.alert-success {
    background: #edf8f1;
    border-color: #c5e5d0;
    color: #0f6c3c;
}

.alert-error {
    background: #fff3f0;
    border-color: #efc0b6;
    color: #b2432f;
}

.admin-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.sidebar-card {
    position: sticky;
    top: 102px;
}

.body-admin .sidebar-card {
    background: linear-gradient(180deg, #ffffff 0%, #f4f9fb 100%);
}

.content-stack {
    display: grid;
    gap: 20px;
}

.stack-links {
    display: grid;
    gap: 12px;
    margin: 18px 0;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card {
    padding: 22px;
}

.body-public .stat-card {
    background: linear-gradient(180deg, rgba(15, 31, 53, 0.92) 0%, rgba(10, 21, 38, 0.88) 100%);
}

.admin-panels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid {
    display: grid;
    gap: 16px;
}

.compact-form {
    margin-top: 14px;
}

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

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

label {
    display: grid;
    gap: 8px;
    font-weight: 800;
}

.body-public label {
    color: #d7e5ff;
}

.body-admin label {
    color: var(--admin-text);
}

.input,
select,
textarea {
    width: 100%;
    min-height: 50px;
    padding: 13px 15px;
    border-radius: 16px;
    font: inherit;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.body-public .input,
.body-public select,
.body-public textarea {
    color: var(--public-text);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 170, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.body-admin .input,
.body-admin select,
.body-admin textarea {
    color: var(--admin-text);
    background: #fff;
    border: 1px solid var(--admin-border);
}

.body-public .input:focus,
.body-public select:focus,
.body-public textarea:focus {
    border-color: rgba(61, 220, 151, 0.5);
    box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.11);
}

.body-admin .input:focus,
.body-admin select:focus,
.body-admin textarea:focus {
    border-color: rgba(13, 110, 110, 0.32);
    box-shadow: 0 0 0 4px rgba(13, 110, 110, 0.08);
}

.helper-text,
.small {
    font-size: 0.92rem;
}

.narrow-container {
    max-width: 560px;
}

.form-card {
    padding: 34px;
}

.body-admin .form-card {
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.country-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.country-card {
    display: flex;
    gap: 16px;
    padding: 18px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.body-public .country-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -40px auto;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(61, 220, 151, 0.18), transparent 70%);
}

.card-link:hover {
    transform: translateY(-2px);
}

.single-team-grid {
    grid-template-columns: minmax(0, 560px);
}

.active-team-card {
    min-height: 154px;
}

.body-public .active-team-card {
    background:
        radial-gradient(circle at top right, rgba(61, 220, 151, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(18, 33, 55, 0.98) 0%, rgba(11, 22, 39, 0.96) 100%);
    border-color: rgba(61, 220, 151, 0.2);
}

.body-admin .active-team-card {
    background: linear-gradient(180deg, #ffffff 0%, #eef8f3 100%);
}

.country-card-content,
.team-title-copy,
.player-copy {
    display: grid;
    gap: 4px;
}

.flag-box {
    width: 82px;
    height: 58px;
    border-radius: 18px;
    overflow: hidden;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.body-public .flag-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(139, 170, 255, 0.14);
}

.body-admin .flag-box {
    background: #f4f7fa;
    border: 1px dashed var(--admin-border);
}

.flag-box.medium {
    width: 104px;
    height: 72px;
}

.flag-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flag-box span {
    font-size: 0.76rem;
    text-align: center;
    padding: 8px;
}

.body-public .flag-box span {
    color: var(--public-muted);
}

.body-admin .flag-box span {
    color: var(--admin-muted);
}

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

.list-row {
    display: grid;
    grid-template-columns: 92px 1fr 1fr 160px 170px 160px;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
}

.body-admin .list-row {
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfd 100%);
    border: 1px solid var(--admin-border);
}

.row-meta {
    display: grid;
    gap: 10px;
    align-items: center;
}

.row-meta.vertical {
    align-content: start;
}

.check-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    overflow: hidden;
    font-weight: 900;
}

.body-public .avatar {
    background: linear-gradient(135deg, rgba(61, 220, 151, 0.24), rgba(22, 64, 214, 0.3));
    color: #fff;
}

.body-admin .avatar {
    background: #ecf4f4;
    color: var(--admin-accent);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 1.5rem;
}

.draft-shell {
    display: grid;
    gap: 22px;
}

.draft-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 18px;
    align-items: stretch;
}

.public-hero {
    padding: 34px;
    position: relative;
    overflow: hidden;
}

.body-public .public-hero {
    background:
        radial-gradient(circle at top right, rgba(255, 183, 3, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(61, 220, 151, 0.14), transparent 26%),
        linear-gradient(135deg, rgba(11, 24, 41, 0.96) 0%, rgba(8, 15, 29, 0.98) 100%);
}

.hero-bullets {
    margin-top: 18px;
}

.public-hero-status {
    align-content: start;
    min-height: 100%;
}

.phase-box {
    display: grid;
    gap: 8px;
    padding: 22px;
    border-radius: 24px;
}

.body-public .phase-box {
    border: 1px solid rgba(139, 170, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
}

.body-admin .phase-box {
    border: 1px solid var(--admin-border);
    background: #fff;
}

.body-public .phase-box.ok {
    background: linear-gradient(180deg, rgba(61, 220, 151, 0.1), rgba(255,255,255,0.03));
}

.body-public .phase-box.warn {
    background: linear-gradient(180deg, rgba(255, 183, 3, 0.12), rgba(255,255,255,0.03));
}

.country-selector-card {
    position: relative;
}

.draft-board {
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    align-items: start;
}

.player-pool,
.roster-panel {
    display: grid;
    gap: 18px;
}

.player-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.player-card {
    padding: 22px;
    display: grid;
    gap: 16px;
    position: relative;
    min-height: 420px;
    overflow: hidden;
    color: var(--public-text);
    background: linear-gradient(180deg, rgba(15, 28, 46, 0.98) 0%, rgba(9, 18, 33, 0.94) 100%);
}

.body-public .player-card {
    background:
        radial-gradient(circle at top right, rgba(255, 183, 3, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(15, 28, 46, 0.98) 0%, rgba(9, 18, 33, 0.94) 100%);
    border-color: rgba(139, 170, 255, 0.18);
    box-shadow: var(--public-shadow);
}

.player-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(61, 220, 151, 0.12), transparent 32%),
        linear-gradient(145deg, rgba(255,255,255,0.04), transparent 40%);
    pointer-events: none;
}

.player-card strong {
    font-size: 1.35rem;
    line-height: 1.2;
}

.player-card.locked {
    opacity: 0.44;
    cursor: not-allowed;
    filter: grayscale(0.2);
}

.player-card.dragging {
    opacity: 0.42;
}

.captain-ribbon {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.body-public .captain-ribbon {
    color: #06111b;
    background: linear-gradient(135deg, var(--public-accent-2), #ffe28d);
}

.body-admin .captain-ribbon {
    color: #fff;
    background: linear-gradient(135deg, var(--admin-accent-2), var(--admin-accent));
}

.player-card-figure {
    display: grid;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.player-photo-stage {
    position: relative;
    min-height: 210px;
    padding: 18px 18px 0;
    border-radius: 26px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.08), transparent 55%),
        linear-gradient(145deg, var(--team-primary, #3ddc97), var(--team-secondary, #ffb703));
    border: 1px solid rgba(255,255,255,0.08);
}

.player-photo-frame {
    position: absolute;
    inset: 10px;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.12);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.avatar-player-large {
    width: 100%;
    height: 220px;
    border-radius: 0;
    background: transparent !important;
    align-items: end;
    position: relative;
    z-index: 1;
}

.avatar-player-large img {
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.32));
}

.player-identity {
    display: grid;
    gap: 8px;
}

.player-meta-list {
    display: grid;
    gap: 6px;
    font-size: 0.95rem;
}

.body-public .player-meta-list {
    color: #c8d8f2;
}

.body-public .player-identity strong,
.body-public .player-copy strong {
    color: #eef5ff;
}

.player-actions,
.tag-row {
    position: relative;
    z-index: 1;
}

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

.inline-action-form {
    margin: 0;
}

.inline-action-form .btn {
    width: 100%;
}

.player-action-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

.search-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.search-input {
    min-height: 54px;
    font-size: 1rem;
}

.drop-zone {
    min-height: 320px;
    padding: 22px;
    border-radius: 24px;
}

.body-public .drop-zone {
    border: 2px dashed rgba(61, 220, 151, 0.32);
    background: linear-gradient(180deg, rgba(5, 13, 24, 0.86) 0%, rgba(9, 20, 35, 0.96) 100%);
}

.body-admin .drop-zone {
    border: 2px dashed rgba(13, 110, 110, 0.26);
    background: linear-gradient(180deg, #ffffff 0%, #f6fbfa 100%);
}

.drop-zone.active {
    transform: scale(1.008);
}

.body-public .drop-zone.active {
    border-color: rgba(61, 220, 151, 0.72);
    box-shadow: inset 0 0 0 1px rgba(61, 220, 151, 0.16);
}

.drop-copy {
    margin-bottom: 14px;
    font-size: 1rem;
}

.roster-list {
    display: grid;
    gap: 14px;
}

.roster-item {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.body-public .roster-item {
    background:
        linear-gradient(135deg, rgba(61, 220, 151, 0.12), rgba(255, 255, 255, 0.04));
}

.avatar-roster {
    width: 72px;
    height: 72px;
    border-radius: 22px;
}

.roster-head {
    align-items: center;
}

.rule-box {
    padding: 16px 18px;
    border-radius: 20px;
    display: grid;
    gap: 6px;
}

.body-public .rule-box {
    background: linear-gradient(135deg, rgba(61, 220, 151, 0.14), rgba(255, 183, 3, 0.14));
    color: var(--public-text);
    border: 1px solid rgba(255, 183, 3, 0.16);
}

.body-admin .rule-box {
    background: rgba(13, 110, 110, 0.08);
    color: var(--admin-text);
}

.team-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.footer-note {
    padding: 0 0 40px;
    font-size: 0.95rem;
}

.body-public .footer-note {
    color: rgba(153, 171, 201, 0.74);
}

.body-admin .footer-note {
    color: var(--admin-muted);
}

@media (max-width: 1080px) {
    .hero-clean,
    .admin-layout,
    .draft-intro,
    .draft-board,
    .admin-panels,
    .simple-grid,
    .stats-strip,
    .split-fields.split-3,
    .split-fields,
    .list-row {
        grid-template-columns: 1fr;
    }

    .sidebar-card {
        position: static;
    }

    .nav-shell {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
    }

    .container {
        width: min(1240px, calc(100% - 24px));
    }
}

@media (max-width: 720px) {
    .public-hero,
    .card,
    .feature-card,
    .form-card {
        padding: 22px;
    }

    .body-public .hero-copy h1,
    .body-public .draft-intro h1 {
        font-size: clamp(2.2rem, 9vw, 3.2rem);
    }

    .player-grid,
    .country-grid {
        grid-template-columns: 1fr;
    }

    .player-card {
        min-height: auto;
    }

    .avatar-player-large {
        height: 180px;
    }
}
