:root {
    --bg-color: #e0f7fa;
    --bg-image: linear-gradient(180deg, #e0f7fa 0%, #ffe0b2 100%);
    --text-color: #333;
    --box-bg: rgba(255, 255, 255, 0.9);
    --primary-btn: #ff9800;
    --primary-hover: #e68a00;
    --vybrano-bg: #d4edda;
    --vybrano-border: #28a745;
    --log-bg: #f5f5f5;

    /* Semantic colors */
    --color-positive: #4CAF50;
    --color-negative: #f44336;
    --color-muted: #888;
    --color-info: #2196F3;
    --color-pink: #e91e63;
    --color-purple: #9c27b0;
    --color-hrdina: #4CAF50;
    --color-padouch: #ffc107;
    --color-slouceni: #00acc1;

    /* Admin specific colors */
    --admin-bg: #1e1e24;
    --admin-box: #2b2b36;
    --admin-border: #3f3f4e;
}

body.dark-theme {
    --bg-color: #1a1a1a;
    --bg-image: radial-gradient(circle, #3e1800 0%, #0a0a0a 80%);
    --text-color: #f4f4f4;
    --box-bg: rgba(30, 30, 30, 0.85);
    --primary-btn: #ff5722;
    --primary-hover: #d84315;
    --vybrano-bg: rgba(255, 87, 34, 0.2);
    --vybrano-border: #ff5722;
    --log-bg: #222;
}

body.admin-theme {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--admin-bg);
    color: #f5f5f5;
    padding: 20px;
    margin: 0;
    transition: none;
    /* No transition for admin */
}

/* Base Body Application Theme */
body.app-theme {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    background: var(--bg-image);
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 20px;
    min-height: 100vh;
    margin: 0;
    transition: all 0.5s ease;
    position: relative;
}

body.app-theme h1,
body.app-theme h2,
body.app-theme h3 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 2px;
    font-weight: normal;
    margin-bottom: 5px;
}

body.admin-theme h1,
body.admin-theme h2,
body.admin-theme h3 {
    margin-top: 0;
}

body.app-theme h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-top: 40px;
}

.box {
    background: var(--box-bg);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 700px;
    margin: auto;
    backdrop-filter: blur(10px);
    position: relative;
}

body.app-theme.season-closed-mode {
    --text-color: #f4f1ea;
    --box-bg: transparent;
    background: #171514;
    color: #f4f1ea;
    padding: 0;
    overflow-x: hidden;
}

body.app-theme.season-closed-mode .top-btn {
    display: none;
}

body.app-theme.season-closed-mode .box {
    display: grid;
    align-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 100svh;
    max-width: none;
    margin: 0;
    padding: clamp(28px, 6vw, 74px);
    border-radius: 0;
    box-shadow: none;
    background:
        linear-gradient(90deg, rgba(255, 152, 0, 0.14), transparent 42%),
        #171514;
    backdrop-filter: none;
}

body.app-theme.season-closed-mode h1 {
    width: min(100%, 1080px);
    margin: 0 auto 28px;
    color: #fff8ef;
    font-size: clamp(3.6rem, 10vw, 8rem);
    line-height: 0.9;
    text-align: center;
    text-shadow: none;
}

.season-closed {
    width: min(100%, 1080px);
    margin: 0 auto;
    text-align: center;
}

.season-closed h2 {
    max-width: 720px;
    margin: 0 auto;
    color: #fff8ef;
    font-size: clamp(2.7rem, 7vw, 6rem);
    line-height: 0.95;
}

.season-lead {
    max-width: 590px;
    margin: 18px auto 34px;
    color: rgba(244, 241, 234, 0.78);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.55;
}

.season-links {
    max-width: 760px;
    margin: 0 auto;
    border-top: 1px solid rgba(244, 241, 234, 0.22);
    border-bottom: 1px solid rgba(244, 241, 234, 0.22);
}

.season-links a {
    display: grid;
    grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
    padding: 16px 0;
    color: #fff8ef;
    text-decoration: none;
    border-bottom: 1px solid rgba(244, 241, 234, 0.14);
}

.season-links a:last-child {
    border-bottom: 0;
}

.season-links a:hover {
    color: #ffb15c;
    transform: translateX(4px);
}

.season-links span {
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 800;
}

.season-links em {
    color: rgba(244, 241, 234, 0.58);
    font-size: 0.95rem;
    font-style: normal;
}

.season-archive-toggle {
    display: block;
    margin: 28px auto 0;
    border: 1px solid rgba(255, 152, 0, 0.65);
    background: transparent;
    color: #ffb15c;
}

.season-archive {
    max-width: 980px;
    margin: 26px auto 0;
    padding-top: 18px;
    border-top: 1px solid rgba(244, 241, 234, 0.22);
    text-align: left;
}

.season-archive.loading {
    color: rgba(244, 241, 234, 0.64);
}

.season-archive-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
}

.season-archive h3 {
    margin: 0;
    color: #fff8ef;
    font-size: 1.5rem;
}

.season-archive-head span {
    color: rgba(244, 241, 234, 0.55);
    font-size: 0.82rem;
    font-weight: 800;
}

.archive-yearbook {
    opacity: 1;
    min-width: 0;
}

.archive-podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 14px;
    align-items: end;
    margin: 18px 0 8px;
}

.archive-podium-item {
    min-height: 132px;
    padding: 18px 16px;
    border-top: 2px solid rgba(244, 241, 234, 0.24);
    border-bottom: 1px solid rgba(244, 241, 234, 0.14);
    background: rgba(244, 241, 234, 0.035);
    animation: archiveRise 0.55s ease both;
}

.archive-podium-item.rank-1 {
    min-height: 160px;
    border-top-color: #ffb15c;
    background: rgba(255, 177, 92, 0.08);
}

.archive-podium-item.rank-2 {
    animation-delay: 0.06s;
}

.archive-podium-item.rank-3 {
    animation-delay: 0.12s;
}

@media (min-width: 701px) {
    .archive-podium-item.rank-1 {
        order: 2;
    }

    .archive-podium-item.rank-2 {
        order: 1;
    }

    .archive-podium-item.rank-3 {
        order: 3;
    }
}

.archive-podium-item span {
    display: block;
    color: #ffb15c;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.archive-podium-item b {
    display: block;
    margin-top: 12px;
    color: #fff8ef;
    font-size: clamp(1.35rem, 3vw, 2.3rem);
    line-height: 1;
    overflow-wrap: anywhere;
}

.archive-podium-item em {
    display: block;
    margin-top: 10px;
    color: rgba(244, 241, 234, 0.62);
    font-style: normal;
    font-weight: 800;
}

.archive-block {
    min-width: 0;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(244, 241, 234, 0.16);
    animation: archiveRise 0.55s ease both;
}

.archive-block-head,
.archive-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 14px;
}

.archive-block-head h4,
.archive-panel-head h4 {
    margin: 0;
    color: #fff8ef;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.7rem;
    font-weight: normal;
    letter-spacing: 0.08em;
}

.archive-block-head span,
.archive-panel-head span {
    color: rgba(244, 241, 234, 0.52);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.archive-chart-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-bottom: 1px solid rgba(244, 241, 234, 0.12);
    overflow-x: hidden;
}

.archive-chart {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.archive-chart-grid line {
    stroke: rgba(244, 241, 234, 0.11);
    stroke-width: 1;
}

.archive-chart-label {
    fill: rgba(244, 241, 234, 0.56);
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 800;
}

.archive-chart-line {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1100;
    stroke-dashoffset: 1100;
    animation: drawArchiveLine 1.2s ease forwards;
    animation-delay: var(--delay);
}

.archive-chart-dot {
    opacity: 0;
    animation: archiveDot 0.35s ease forwards;
    animation-delay: 1.1s;
}

.archive-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 8px 0 14px;
}

.archive-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: rgba(244, 241, 234, 0.72);
    font-size: 0.86rem;
    font-weight: 700;
}

.archive-chart-legend b {
    color: #fff8ef;
    font-weight: 900;
}

.archive-chart-legend i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.archive-chart-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
}

.archive-chart-range {
    display: grid;
    grid-template-columns: auto minmax(140px, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    color: rgba(244, 241, 234, 0.82);
    font-size: 0.82rem;
    font-weight: 800;
}

.archive-chart-range label,
.archive-chart-range output {
    white-space: nowrap;
}

.archive-chart-range input {
    width: 100%;
    min-width: 0;
    accent-color: #ffb15c;
}

.archive-chart-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.archive-chart-actions button,
.archive-player-toggle {
    margin: 0;
    border: 1px solid rgba(244, 241, 234, 0.26);
    background: rgba(244, 241, 234, 0.075);
    color: rgba(244, 241, 234, 0.88);
    font-size: 0.76rem;
    font-weight: 900;
}

.archive-chart-actions button {
    padding: 8px 11px;
    border-radius: 999px;
}

.archive-player-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.archive-player-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-width: 0;
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 999px;
    text-align: left;
}

.archive-player-toggle i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.archive-player-toggle span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-chart-actions button:hover,
.archive-player-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 177, 92, 0.46);
    color: #fff8ef;
}

.archive-player-toggle.active {
    border-color: rgba(255, 177, 92, 0.7);
    background: rgba(255, 177, 92, 0.14);
    color: #fff8ef;
}

.archive-chart-empty {
    display: grid;
    place-items: center;
    min-height: 180px;
    border-top: 1px solid rgba(244, 241, 234, 0.12);
    color: rgba(244, 241, 234, 0.58);
    font-weight: 800;
    text-align: center;
}

.archive-records {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 18px;
}

.archive-record {
    min-width: 0;
    padding: 0 0 14px;
    border-bottom: 1px solid rgba(244, 241, 234, 0.16);
    animation: archiveRise 0.5s ease both;
    animation-delay: var(--delay);
}

.archive-record span {
    display: block;
    color: rgba(244, 241, 234, 0.52);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.archive-record b {
    display: block;
    margin-top: 7px;
    color: #fff8ef;
    font-size: 1.18rem;
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.archive-record em {
    display: block;
    margin-top: 4px;
    color: #ffb15c;
    font-size: 0.84rem;
    font-style: normal;
    font-weight: 800;
}

.archive-split {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
    gap: 28px;
}

.archive-panel {
    min-width: 0;
}

.archive-contestant-list {
    display: grid;
    gap: 10px;
}

.archive-contestant-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.9fr) minmax(0, 1.4fr) 54px;
    gap: 12px;
    align-items: center;
}

.archive-contestant-row span {
    color: #fff8ef;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.archive-contestant-row div {
    height: 7px;
    background: rgba(244, 241, 234, 0.12);
    overflow: hidden;
}

.archive-contestant-row i {
    display: block;
    height: 100%;
    background: #ffb15c;
    animation: archiveBar 0.8s ease both;
}

.archive-contestant-row b {
    color: #fff8ef;
    text-align: right;
}

.archive-elimination-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.archive-elimination-list li {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: baseline;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(244, 241, 234, 0.12);
}

.archive-elimination-list span {
    color: #ffb15c;
    font-size: 0.78rem;
    font-weight: 900;
}

.archive-elimination-list b {
    color: #f4f1ea;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.season-archive table {
    width: 100%;
    margin-top: 12px;
    table-layout: fixed;
    border-collapse: collapse;
    border-radius: 0;
    overflow: visible;
    color: #f4f1ea;
    background: transparent;
}

.season-archive th,
.season-archive td {
    padding: 14px 10px;
    border-bottom: 1px solid rgba(244, 241, 234, 0.12);
    background: transparent;
    color: #f4f1ea;
    font-size: 1rem;
    text-align: left;
}

.season-archive th {
    border-bottom: 2px solid rgba(255, 152, 0, 0.62);
    color: #ffb15c;
    font-family: 'Poppins', sans-serif;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.season-archive th:nth-child(1),
.season-archive td:nth-child(1) {
    width: 64px;
    padding-left: 0;
    text-align: center;
}

.season-archive th:nth-child(2),
.season-archive td:nth-child(2) {
    width: 31%;
    text-align: left;
}

.season-archive th:nth-child(3),
.season-archive td:nth-child(3) {
    width: auto;
    text-align: left;
}

.season-archive td:last-child,
.season-archive th:last-child {
    width: 92px;
    padding-right: 0;
    text-align: right;
}

@keyframes archiveRise {
    from {
        opacity: 0.45;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drawArchiveLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes archiveDot {
    to {
        opacity: 1;
    }
}

@keyframes archiveBar {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }

    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .archive-yearbook,
    .archive-podium-item,
    .archive-block,
    .archive-record,
    .archive-chart-line,
    .archive-chart-dot,
    .archive-contestant-row i {
        animation: none;
        opacity: 1;
        stroke-dashoffset: 0;
    }
}

body.admin-theme .box {
    background: var(--admin-box);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--admin-border);
    backdrop-filter: none;
}

button {
    background: var(--primary-btn);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

body.admin-theme button {
    font-size: 14px;
    padding: 10px;
}

button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

button:disabled {
    background: #888;
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
    filter: none;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--box-bg);
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-color);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(150, 150, 150, 0.5);
    border-radius: 10px;
}

body.admin-theme .custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

body.admin-theme .custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--box-bg);
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    font-size: 14px;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    border-left: 5px solid;
}

body.admin-theme .toast {
    background: var(--admin-box);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.error {
    border-left-color: #f44336;
}

.toast.success {
    border-left-color: #4CAF50;
}

.toast.info {
    border-left-color: #2196F3;
}

/* Shared Grid */
.emoji-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin: 15px 0;
}

.emoji-item {
    font-size: 26px;
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: 0.2s;
    background: rgba(150, 150, 150, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item.selected {
    border-color: var(--primary-btn);
    background: rgba(255, 152, 0, 0.2);
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ---------- INDEX SPECIFIC ---------- */
.top-btn {
    position: absolute;
    top: 20px;
    background: transparent;
    color: var(--text-color);
    border: 2px solid var(--text-color);
    padding: 8px 15px;
    font-size: 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

.top-btn:hover {
    background: var(--text-color);
    color: var(--box-bg);
}

.theme-toggle {
    right: 20px;
}

.pravidla-toggle {
    left: 20px;
}

.odpocet-box {
    background: rgba(0, 0, 0, 0.05);
    padding: 10px;
    border-radius: 8px;
    font-family: 'Poppins', monospace;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 20px;
    color: var(--text-color);
    border: 1px solid rgba(150, 150, 150, 0.2);
}

body.dark-theme .odpocet-box {
    background: rgba(255, 255, 255, 0.05);
    color: #ffeb3b;
}

.grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.soutezici {
    padding: 15px 10px;
    border-radius: 12px;
    width: 25%;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.soutezici:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.soutezici img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background-color: rgba(150, 150, 150, 0.2);
}

.jmeno-wrapper {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-bottom: 5px;
}

.soutezici.vyrazen {
    opacity: 0.4;
    filter: grayscale(100%);
}

.soutezici.vyrazen:not(.vybrano) {
    cursor: not-allowed;
    pointer-events: none;
}

.soutezici.hrdina {
    border: 2px solid rgba(76, 175, 80, 0.3);
    background: linear-gradient(180deg, rgba(76, 175, 80, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
}

.soutezici.padouch {
    border: 2px solid rgba(255, 193, 7, 0.3);
    background: linear-gradient(180deg, rgba(255, 193, 7, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
}

.soutezici.slouceni {
    border: 2px solid rgba(0, 172, 193, 0.32);
    background: linear-gradient(180deg, rgba(0, 172, 193, 0.12) 0%, rgba(0, 0, 0, 0) 100%);
}

.soutezici.hrdina.vybrano {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.25);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.soutezici.padouch.vybrano {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.25);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
}

.soutezici.slouceni.vybrano {
    border-color: #00acc1;
    background: rgba(0, 172, 193, 0.22);
    box-shadow: 0 0 15px rgba(0, 172, 193, 0.35);
}

.kmen-badge {
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.kmen-badge.hrdina {
    background: #4CAF50;
    color: white;
}

.kmen-badge.padouch {
    background: #ffc107;
    color: #333;
}

.kmen-badge.slouceni {
    background: var(--color-slouceni);
    color: white;
}

/* Skeleton Loading Animation */
@keyframes skeleton-loading {
    0% {
        background-color: rgba(150, 150, 150, 0.1);
    }

    50% {
        background-color: rgba(150, 150, 150, 0.3);
    }

    100% {
        background-color: rgba(150, 150, 150, 0.1);
    }
}

.skeleton {
    background: rgba(150, 150, 150, 0.2);
    border-radius: 4px;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 5px;
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

.skeleton-text {
    width: 80%;
    height: 16px;
    margin: 5px auto;
}

/* Badge / Trophy Animations */
@keyframes badge-entrance {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(10px);
    }

    60% {
        transform: scale(1.15) translateY(-3px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes badge-shimmer {
    0% {
        box-shadow: 0 0 0 rgba(255, 152, 0, 0);
    }

    50% {
        box-shadow: 0 0 12px rgba(255, 152, 0, 0.4);
    }

    100% {
        box-shadow: 0 0 0 rgba(255, 152, 0, 0);
    }
}

.trofej-badge {
    background: rgba(255, 152, 0, 0.12);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: help;
    white-space: nowrap;
    animation: badge-entrance 0.5s ease-out forwards, badge-shimmer 3s ease-in-out 0.5s infinite;
    opacity: 0;
}

.trofej-badge:hover {
    transform: scale(1.08);
    background: rgba(255, 152, 0, 0.22);
}

/* MVP Row Highlight */
@keyframes mvp-glow {
    0% {
        box-shadow: inset 0 0 0 rgba(255, 215, 0, 0);
    }

    50% {
        box-shadow: inset 0 0 10px rgba(255, 215, 0, 0.15);
    }

    100% {
        box-shadow: inset 0 0 0 rgba(255, 215, 0, 0);
    }
}

.mvp-row {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, transparent 100%) !important;
    animation: mvp-glow 3s ease-in-out infinite;
}

.mvp-badge-inline {
    display: inline-block;
    font-size: 10px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    margin-left: 5px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Head-to-Head Comparison */
.h2h-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center;
    margin-top: 15px;
}

.h2h-player {
    text-align: center;
    padding: 15px;
    background: rgba(150, 150, 150, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(150, 150, 150, 0.2);
}

.h2h-vs {
    font-size: 28px;
    font-weight: 900;
    color: var(--color-muted);
    letter-spacing: 2px;
}

.h2h-stat-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(150, 150, 150, 0.1);
    align-items: center;
    font-size: 14px;
}

.h2h-stat-label {
    text-align: center;
    font-size: 12px;
    color: var(--color-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.h2h-val-left {
    text-align: right;
    font-weight: 700;
}

.h2h-val-right {
    text-align: left;
    font-weight: 700;
}

.h2h-winner {
    color: var(--color-positive);
}

.h2h-loser {
    color: var(--color-negative);
}

.soutezici.kapitan-card {
    border-color: #ff9800 !important;
    background: rgba(255, 152, 0, 0.25) !important;
    box-shadow: 0 0 15px #ff9800 !important;
}

.btn-kapitan-select {
    background: #ff9800;
    color: white;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 10px;
    border: none;
    cursor: pointer;
    display: none;
    width: 100%;
}

.vybrano .btn-kapitan-select {
    display: block;
}

.kapitan-card .btn-kapitan-select {
    background: #e65100;
    cursor: default;
}

.jmeno {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.body-souteziciho {
    font-size: 13px;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 35px;
}

.tym-list {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tym-list li {
    padding: 15px 10px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 115px;
    box-sizing: border-box;
    cursor: pointer;
    transition: 0.3s;
}

.tym-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.tym-list li.hrdina {
    border: 2px solid rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.1);
}

.tym-list li.padouch {
    border: 2px solid rgba(255, 193, 7, 0.5);
    background: rgba(255, 193, 7, 0.1);
}

.tym-list li.slouceni {
    border: 2px solid rgba(0, 172, 193, 0.5);
    background: rgba(0, 172, 193, 0.1);
}

.tym-list img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 5px;
    object-fit: cover;
    background-color: rgba(150, 150, 150, 0.2);
}

table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    border-radius: 10px;
    overflow: hidden;
}

th,
td {
    padding: 15px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.2);
    text-align: center;
}

th {
    background-color: var(--primary-btn);
    color: white;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
}

.zvyraznene-body {
    color: var(--primary-btn);
    font-weight: bold;
    font-size: 1.2rem;
}

.hrac-row {
    cursor: pointer;
    transition: 0.2s;
}

.hrac-row:hover {
    background: rgba(150, 150, 150, 0.1) !important;
}

.stat-row-hrdina {
    background: rgba(76, 175, 80, 0.05);
}

.stat-row-padouch {
    background: rgba(255, 193, 7, 0.05);
}

.stat-row-slouceni {
    background: rgba(0, 172, 193, 0.06);
}

body.dark-theme .stat-row-hrdina {
    background: rgba(76, 175, 80, 0.12);
}

body.dark-theme .stat-row-padouch {
    background: rgba(255, 193, 7, 0.12);
}

body.dark-theme .stat-row-slouceni {
    background: rgba(0, 172, 193, 0.12);
}

.denik-box {
    background: var(--log-bg);
    padding: 15px;
    border-radius: 10px;
    text-align: left;
    overflow-y: auto;
    font-size: 14px;
    border: 1px solid rgba(150, 150, 150, 0.3);
}

.denik-zaznam {
    margin: 5px 0;
    padding: 8px;
    border-radius: 5px;
    border-bottom: 1px dashed rgba(150, 150, 150, 0.2);
}

.log-plus {
    background: rgba(40, 167, 69, 0.1);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.log-minus {
    background: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.log-neutral {
    background: transparent;
    color: inherit;
    border: 1px solid transparent;
}

body.dark-theme .log-plus {
    background: rgba(76, 175, 80, 0.15) !important;
    color: #a5d6a7 !important;
    border-color: rgba(76, 175, 80, 0.4) !important;
}

body.dark-theme .log-minus {
    background: rgba(244, 67, 54, 0.15) !important;
    color: #ef9a9a !important;
    border-color: rgba(244, 67, 54, 0.4) !important;
}

.edit-icon {
    cursor: pointer;
    opacity: 0.5;
    font-size: 16px;
    margin-left: 5px;
    transition: 0.2s;
}

.edit-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

.historie-kol-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
}

.historie-kol-table th {
    background: transparent;
    color: var(--text-color);
    border-bottom: 2px solid rgba(150, 150, 150, 0.3);
    padding: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
}

.historie-kol-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.1);
}

body.app-theme input {
    padding: 12px;
    font-size: 16px;
    width: 80%;
    border: 2px solid #ccc;
    border-radius: 8px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border 0.3s;
}

/* ---------- ADMIN SPECIFIC ---------- */

body.admin-theme .dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: auto;
}

@media(max-width: 800px) {
    body.admin-theme .dashboard {
        grid-template-columns: 1fr;
    }
}

body.admin-theme #login-screen {
    display: block;
    max-width: 400px;
    margin: 100px auto;
    text-align: center;
}

body.admin-theme #login-screen input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    border: none;
    box-sizing: border-box;
    font-size: 16px;
    background: #fff;
    color: #333;
}

body.admin-theme #login-screen button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    margin-top: 10px;
    background: #4CAF50;
    color: white;
}

body.admin-theme #admin-obsah {
    display: none;
}

.soutezici-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.sout-btn {
    background: #3f3f4e;
    color: #ccc;
    border: 2px solid transparent;
    padding: 10px 5px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    font-size: 13px;
}

.sout-btn.hrdina {
    border-left: 4px solid #4CAF50;
}

.sout-btn.padouch {
    border-left: 4px solid #ffc107;
}

.sout-btn.slouceni {
    border-left: 4px solid #00acc1;
}

.sout-btn.selected {
    background: #e3f2fd;
    color: #0d47a1;
    border-color: #2196f3;
    font-weight: bold;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
}

.sout-btn.vyrazen {
    opacity: 0.3;
    filter: grayscale(100%);
    text-decoration: line-through;
}

.merge-preview {
    margin: 12px 0;
    padding: 12px;
    border-left: 4px solid var(--color-slouceni);
    background: rgba(0, 0, 0, 0.18);
    color: #ddd;
    font-size: 13px;
    line-height: 1.45;
}

.merge-preview strong {
    color: #fff;
}

.admin-inline-tools {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin: 10px 0;
}

.admin-inline-tools input {
    margin: 0;
}

.admin-checkline {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: #aaa;
    font-size: 12px;
    white-space: nowrap;
}

.admin-checkline input {
    width: auto;
    margin: 0;
}

.selected-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 30px;
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.selected-panel.empty {
    color: #888;
    font-size: 12px;
    align-items: center;
}

.selected-pill {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    width: auto;
    margin: 0;
    padding: 5px 8px;
    border: 1px solid rgba(33, 150, 243, 0.45);
    background: rgba(33, 150, 243, 0.12);
    color: #e3f2fd;
    font-size: 12px;
}

.selected-pill span {
    color: #90caf9;
    font-weight: 800;
}

.admin-actions-line {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.admin-actions-line button {
    margin: 0;
    padding: 10px;
    font-size: 12px;
}

.admin-check-results {
    padding: 10px 0;
    color: #aaa;
    font-size: 12px;
    line-height: 1.45;
}

.admin-check-results ul {
    padding-left: 18px;
    margin: 8px 0 0;
}

.admin-check-results li {
    margin-bottom: 4px;
}

.admin-check-results li.ok {
    color: #a5d6a7;
}

.admin-check-results li.warn {
    color: #ffcc80;
}

.akce-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.akce-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    font-size: 14px;
    text-align: left;
}

.akce-btn span {
    font-weight: 900;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 5px;
}

.akce-plus {
    background: #2e7d32;
}

.akce-plus2 {
    background: #00695c;
}

.akce-yellow {
    background: #f57c00;
}

.akce-minus {
    background: #c62828;
}

.akce-death {
    background: #212121;
    border: 1px solid #c62828;
}

.omyl-toggle {
    background: rgba(244, 67, 54, 0.1);
    border: 2px dashed #f44336;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.omyl-toggle.active {
    background: #c62828;
    color: white;
    border-style: solid;
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.6);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #ffeb3b;
}

input:checked+.slider:before {
    transform: translateX(26px);
    background-color: #333;
}

body.admin-theme input[type="text"],
body.admin-theme input[type="number"],
body.admin-theme input[type="search"],
body.admin-theme select {
    width: 100%;
    padding: 10px;
    margin: 5px 0 15px;
    border-radius: 5px;
    border: none;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    font-family: 'Segoe UI', sans-serif;
}

.log {
    margin-top: 15px;
    background: #111;
    padding: 10px;
    border-radius: 5px;
    text-align: left;
    font-family: monospace;
    font-size: 13px;
    min-height: 150px;
    color: #4caf50;
    overflow-y: auto;
    max-height: 250px;
    border: 1px solid #333;
}

.manager-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 5px;
}

.manager-row button {
    padding: 5px 10px;
    font-size: 12px;
    margin-left: 5px;
}

/* Modal Edit Akce in Admin */
#edit-akce-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-box {
    background: #2b2b36;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    border: 1px solid #3f3f4e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.btn-kmen-rychly {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 4px 10px;
    font-size: 11px;
    height: fit-content;
}

.btn-kmen-rychly:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Page transition --- */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-transition {
    animation: fadeSlideIn 0.3s ease-out;
}

/* --- Consolidated quick menu --- */
.quick-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    justify-content: center;
}

.quick-menu button {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    white-space: nowrap;
}

.box:has(.league-shell),
.box:has(.draft-workspace) {
    max-width: 920px;
    padding: 24px;
}

.league-shell {
    text-align: left;
}

.league-header,
.draft-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.24);
    padding-bottom: 14px;
    margin-bottom: 12px;
}

.league-header h2,
.draft-head h2 {
    margin: 0;
    font-size: 2.1rem;
    line-height: 1;
}

.league-eyebrow {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.league-scoreline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    font-weight: 700;
}

.score-stat,
.draft-count {
    border-left: 1px solid rgba(150, 150, 150, 0.35);
    padding-left: 10px;
}

.score-stat {
    display: grid;
    gap: 2px;
    min-width: 74px;
}

.score-stat small {
    color: var(--color-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.score-stat b {
    font-size: 1.45rem;
    line-height: 1;
}

.score-stat.primary b {
    font-size: 1.75rem;
}

.positive {
    color: var(--color-positive);
}

.negative {
    color: var(--color-negative);
}

.muted {
    color: var(--color-muted);
}

.draft-status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0 14px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.18);
    font-size: 13px;
}

.draft-action-line {
    justify-content: center;
    padding: 12px 0 16px;
}

.draft-status-line button,
.text-action {
    background: transparent;
    color: var(--primary-btn);
    border: 1px solid rgba(255, 152, 0, 0.45);
    margin: 0;
    padding: 8px 12px;
    font-size: 13px;
}

.draft-status-line .primary-edit-team {
    width: min(100%, 360px);
    background: var(--primary-btn);
    color: white;
    border: 0;
    padding: 13px 18px;
    font-size: 16px;
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.18);
}

.endgame-notice {
    max-width: 760px;
    margin: 12px auto 0;
    padding: 9px 0;
    border-top: 1px solid rgba(255, 87, 34, 0.35);
    border-bottom: 1px solid rgba(255, 87, 34, 0.35);
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.league-section {
    padding: 18px 0;
    border-bottom: 1px solid rgba(150, 150, 150, 0.18);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}

.section-heading h3 {
    margin: 0;
    font-size: 1.35rem;
}

.section-heading span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 700;
}

.lineup-strip {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.lineup-count-3,
.draft-slots-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lineup-count-2,
.draft-slots-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.lineup-count-1,
.draft-slots-1 {
    grid-template-columns: minmax(0, 1fr);
}

.lineup-slot {
    display: flex;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 8px 0;
    border-bottom: 2px solid rgba(150, 150, 150, 0.18);
    cursor: pointer;
}

.lineup-slot.hrdina {
    border-bottom-color: rgba(76, 175, 80, 0.55);
}

.lineup-slot.padouch {
    border-bottom-color: rgba(255, 193, 7, 0.65);
}

.lineup-slot.slouceni {
    border-bottom-color: rgba(0, 172, 193, 0.65);
}

.lineup-slot.captain {
    border-bottom-color: var(--primary-btn);
}

.lineup-slot.out {
    opacity: 0.58;
}

.lineup-slot img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.slot-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.slot-copy b,
.league-player-cell b,
.draft-slot b {
    overflow-wrap: anywhere;
}

.slot-role,
.slot-meta {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
}

.chip-section {
    padding-top: 14px;
}

.compact-log {
    max-height: 190px;
}

.denik-feed {
    max-height: 340px;
    padding: 8px;
}

.denik-feed.expanded {
    max-height: 520px;
}

.denik-date-separator {
    text-align: center;
    padding: 6px 0;
    margin: 6px 0 4px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.2);
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.denik-round-marker {
    text-align: center;
    padding: 7px 8px;
    margin: 5px 0;
    border: 1px solid rgba(150, 150, 150, 0.3);
    border-radius: 6px;
    background: rgba(150, 150, 150, 0.14);
    color: var(--text-color);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.denik-zaznam.denik-compact-row {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    margin: 4px 0;
    padding: 7px 8px;
    border-style: solid;
    border-radius: 6px;
    line-height: 1.25;
}

.denik-time {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.denik-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.denik-toggle {
    margin-top: 10px;
}

.league-table {
    margin-top: 0;
}

.league-table th {
    font-size: 1rem;
}

.league-table th,
.league-table td {
    padding: 10px 8px;
}

.league-table .is-me {
    background: rgba(255, 152, 0, 0.12);
}

.league-player-cell {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.25;
}

.table-totem {
    font-size: 20px;
    flex: 0 0 auto;
}

.draft-workspace {
    text-align: center;
}

.draft-workspace .draft-head {
    display: grid;
    justify-content: center;
    justify-items: center;
    text-align: center;
}

.draft-workspace .draft-count {
    border-left: 0;
    padding-left: 0;
}

.draft-slots {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 12px 0 16px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.18);
    text-align: left;
}

.draft-slot {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 8px;
    align-items: center;
    border-bottom: 2px solid rgba(150, 150, 150, 0.2);
    padding-bottom: 8px;
}

.draft-slot img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    grid-row: span 2;
}

.draft-slot span {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
}

.draft-slot small {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
}

.draft-slot.empty span {
    width: 32px;
    height: 32px;
    border: 1px dashed rgba(150, 150, 150, 0.45);
    border-radius: 50%;
    display: grid;
    place-items: center;
    grid-row: span 2;
}

.draft-slot.captain {
    border-bottom-color: var(--primary-btn);
}

.draft-filters {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    max-width: 760px;
    margin: 14px auto 0;
    padding-bottom: 2px;
    justify-content: center;
}

.draft-actions-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
    max-width: 760px;
    margin: 14px auto 0;
}

.draft-actions-top #ulozit-tym-btn {
    width: 100%;
    margin: 0;
}

.draft-actions-top .text-action {
    display: grid;
    place-items: center;
    margin: 0;
    white-space: nowrap;
}

.draft-money-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 0 4px;
    max-width: 760px;
    margin: 0 auto;
    text-align: left;
}

.league-money-panel {
    max-width: none;
    padding: 2px 0 18px;
    margin-bottom: 2px;
}

.money-card {
    border-bottom: 2px solid rgba(150, 150, 150, 0.22);
    padding: 0 0 8px;
}

.money-card span {
    display: block;
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.money-card b {
    display: block;
    margin-top: 3px;
    color: var(--text-color);
    font-size: 1.35rem;
    line-height: 1;
}

.money-card.emphasis {
    border-bottom-color: var(--primary-btn);
}

.draft-money-panel.over .money-card.emphasis,
.draft-money-panel.over .money-card.emphasis b {
    color: var(--color-negative);
    border-bottom-color: var(--color-negative);
}

.transfer-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    justify-content: center;
    color: var(--color-muted);
    font-size: 0.88rem;
    max-width: 760px;
    margin: 8px auto 0;
    text-align: center;
}

.transfer-line b {
    color: var(--text-color);
}

.transfer-line.penalty,
.transfer-line.penalty b {
    color: var(--color-negative);
}

.chip-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 760px;
    margin: 10px auto 0;
}

.chip-btn {
    display: grid;
    gap: 4px;
    justify-items: center;
    align-content: center;
    text-align: center;
    min-width: 0;
    min-height: 66px;
    width: 100%;
    margin: 0;
    padding: 11px 12px;
    border: 1px solid rgba(150, 150, 150, 0.32);
    background: transparent;
    color: var(--text-color);
    line-height: 1.15;
}

.chip-btn span {
    overflow-wrap: anywhere;
}

.chip-btn em {
    max-width: 100%;
    color: var(--color-muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.chip-btn small {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 700;
}

.chip-btn.active {
    border-color: var(--primary-btn);
    background: rgba(255, 152, 0, 0.12);
}

.chip-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: rgba(150, 150, 150, 0.12);
}

.chip-triple_captain {
    border-color: rgba(255, 193, 7, 0.48);
    background: rgba(255, 193, 7, 0.09);
}

.chip-triple_captain.active {
    border-color: #ffc107;
    background: rgba(255, 193, 7, 0.18);
}

.chip-shield {
    border-color: rgba(0, 172, 193, 0.5);
    background: rgba(0, 172, 193, 0.1);
}

.chip-shield.active {
    border-color: #00acc1;
    background: rgba(0, 172, 193, 0.18);
}

.chip-free_hit {
    border-color: rgba(76, 175, 80, 0.48);
    background: rgba(76, 175, 80, 0.1);
}

.chip-free_hit.active {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.18);
}

button.danger-action,
body.admin-theme button.danger-action {
    background: var(--color-negative) !important;
}

.draft-filter {
    background: transparent;
    color: var(--text-color);
    border: 1px solid rgba(150, 150, 150, 0.35);
    padding: 7px 10px;
    margin: 0;
    font-size: 12px;
    white-space: nowrap;
}

.draft-filter.active {
    border-color: var(--primary-btn);
    color: var(--primary-btn);
    background: rgba(255, 152, 0, 0.1);
}

.draft-grid {
    justify-content: flex-start;
    gap: 10px;
    margin-top: 12px;
}

.draft-grid .soutezici {
    width: calc(25% - 12px);
    min-width: 132px;
    box-sizing: border-box;
}

.draft-metrics {
    gap: 2px;
}

.draft-metrics small {
    color: var(--color-muted);
    font-size: 10px;
    font-weight: 600;
}

button.text-action {
    display: block;
    width: fit-content;
    margin: 14px auto 0;
}

.jury-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.jury-inline {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(150, 150, 150, 0.14);
}

.jury-title {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.jury-member {
    display: grid;
    grid-template-columns: 42px minmax(95px, 1fr);
    column-gap: 8px;
    align-items: center;
    min-width: 170px;
    text-align: left;
    margin: 0;
    padding: 8px 0;
    border: 0;
    border-bottom: 2px solid var(--color-slouceni);
    border-radius: 0;
    background: transparent;
    color: var(--text-color);
}

.jury-member img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    grid-row: span 2;
    filter: grayscale(100%);
}

.jury-member span {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 700;
}

.jury-member b {
    overflow-wrap: anywhere;
}

/* --- Last updated --- */
.last-updated {
    text-align: center;
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 20px;
    padding: 8px;
    opacity: 0.7;
}

/* --- Zajímavosti cards --- */
.zajimavost-card {
    background: rgba(150, 150, 150, 0.08);
    border: 1px solid rgba(150, 150, 150, 0.15);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.4;
}

.zajimavost-card .emoji {
    font-size: 22px;
    flex-shrink: 0;
}

.zajimavost-card .label {
    color: var(--color-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.zajimavost-card .value {
    font-weight: 700;
    font-size: 15px;
}

/* --- Mobile swipe hint --- */
.swipe-hint {
    text-align: center;
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 10px;
    opacity: 0.6;
}

/* =================== ADMIN PANEL ENHANCEMENTS =================== */

/* --- Status Bar --- */
.admin-status-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    border: 1px solid #3f3f4e;
    align-items: center;
    justify-content: center;
}

.admin-status-bar .stat-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.06);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
}

.admin-status-bar .stat-chip .val {
    font-weight: 700;
    color: #ffeb3b;
}

/* --- Admin Tabs --- */
.admin-tabs {
    display: flex;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto 20px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #3f3f4e;
}

.admin-tab-btn {
    flex: 1;
    padding: 14px 10px;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    color: #aaa;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-right: 1px solid #3f3f4e;
    text-align: center;
}

.admin-tab-btn:last-child {
    border-right: none;
}

.admin-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.admin-tab-btn.active {
    background: rgba(255, 152, 0, 0.15);
    color: #ff9800;
    border-bottom: 3px solid #ff9800;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
    animation: fadeSlideIn 0.25s ease-out;
}

/* --- Selected count badge --- */
.vyber-pocet {
    display: inline-block;
    background: #ff9800;
    color: #000;
    font-weight: 700;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

@media (max-width: 600px) {
    body.app-theme.season-closed-mode .box {
        min-height: 100svh;
        padding: 28px 22px;
    }

    body.app-theme.season-closed-mode h1 {
        margin-bottom: 22px;
        font-size: clamp(2.65rem, 13vw, 3.3rem);
        text-align: center;
        overflow-wrap: anywhere;
    }

    .season-closed {
        text-align: center;
    }

    .season-closed h2 {
        max-width: 9ch;
        margin-inline: auto;
        font-size: clamp(2.3rem, 11vw, 3rem);
        overflow-wrap: anywhere;
    }

    .season-lead {
        margin-bottom: 28px;
    }

    .season-links a {
        grid-template-columns: 1fr;
        gap: 4px;
        text-align: center;
    }

    .season-links a:hover {
        transform: none;
    }

    .season-archive-toggle {
        width: 100%;
    }

    .season-archive {
        text-align: left;
        overflow-x: auto;
    }

    .archive-podium,
    .archive-records,
    .archive-split {
        grid-template-columns: 1fr;
    }

    .archive-podium-item,
    .archive-podium-item.rank-1 {
        min-height: 0;
    }

    .archive-block-head,
    .archive-panel-head,
    .season-archive-head {
        display: grid;
        align-items: flex-start;
        gap: 4px;
    }

    .archive-chart {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .archive-chart-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .archive-chart-toolbar {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .archive-chart-range {
        grid-template-columns: 1fr;
        justify-items: stretch;
        gap: 7px;
        text-align: center;
    }

    .archive-chart-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        justify-content: stretch;
    }

    .archive-chart-actions button {
        width: 100%;
        padding: 9px 6px;
        font-size: 0.68rem;
    }

    .archive-player-toggles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .archive-player-toggle {
        min-height: 40px;
        padding: 8px 9px;
        font-size: 0.72rem;
    }

    .archive-contestant-row {
        grid-template-columns: minmax(92px, 1fr) minmax(72px, 1fr) 44px;
        gap: 8px;
    }

    .season-archive th:nth-child(3),
    .season-archive td:nth-child(3) {
        display: none;
    }

    .season-archive th,
    .season-archive td {
        padding: 12px 6px;
        font-size: 0.92rem;
    }

    .season-archive th {
        font-size: 0.68rem;
        letter-spacing: 0.08em;
    }

    .season-archive th:nth-child(1),
    .season-archive td:nth-child(1) {
        width: 42px;
    }

    .season-archive th:nth-child(2),
    .season-archive td:nth-child(2) {
        width: auto;
    }

    .season-archive td:nth-child(2) b {
        overflow-wrap: anywhere;
    }

    .season-archive td:last-child,
    .season-archive th:last-child {
        width: 68px;
    }

    .box:has(.league-shell),
    .box:has(.draft-workspace) {
        padding: 18px;
    }

    .league-header,
    .draft-head,
    .draft-status-line,
    .section-heading {
        display: grid;
        justify-content: stretch;
    }

    .league-header h2,
    .draft-head h2 {
        font-size: 1.65rem;
    }

    .league-scoreline {
        justify-content: flex-start;
    }

    .score-stat:first-child {
        border-left: 0;
        padding-left: 0;
    }

    .score-stat b {
        font-size: 1.25rem;
    }

    .score-stat.primary b {
        font-size: 1.45rem;
    }

    .lineup-strip,
    .draft-slots {
        grid-template-columns: 1fr 1fr;
    }

    .lineup-count-3,
    .draft-slots-3 {
        grid-template-columns: 1fr;
    }

    .lineup-count-1,
    .draft-slots-1 {
        grid-template-columns: 1fr;
    }

    .lineup-slot {
        align-items: flex-start;
    }

    .lineup-slot img {
        width: 44px;
        height: 44px;
    }

    .league-table th,
    .league-table td {
        padding: 8px 5px;
        font-size: 12px;
    }

    .league-player-cell {
        gap: 5px;
    }

    .table-totem {
        font-size: 16px;
    }

    .quick-menu {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow-x: visible;
        padding-bottom: 0;
    }

    .quick-menu button {
        width: 100%;
        padding: 8px 6px;
        font-size: 11px;
    }

    .draft-filters {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow-x: visible;
    }

    .draft-filter {
        width: 100%;
        padding: 8px 5px;
        font-size: 11px;
    }

    .draft-action-line .primary-edit-team {
        width: 100%;
    }

    .draft-actions-top {
        grid-template-columns: 1fr;
    }

    .denik-feed {
        max-height: 360px;
    }

    .denik-zaznam.denik-compact-row {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 7px;
        font-size: 12px;
    }

    .draft-grid .soutezici {
        width: calc(50% - 8px);
        min-width: 0;
    }

    .draft-money-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .money-card b {
        font-size: 1.2rem;
    }

    .chip-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .chip-btn {
        min-height: 58px;
        padding: 10px 12px;
    }

    .transfer-line {
        display: grid;
        gap: 4px;
    }

    .admin-tab-btn {
        font-size: 12px;
        padding: 12px 6px;
    }

    .admin-status-bar {
        padding: 10px 12px;
        gap: 6px;
    }

    .admin-status-bar .stat-chip {
        font-size: 11px;
        padding: 4px 10px;
    }
}
