body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #101828;
    background-image:
        linear-gradient(rgba(8, 18, 35, 0.68), rgba(8, 18, 35, 0.68)),
        url('/static/assets/site-background-2.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

header {
    background-color: #0078d7;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
    position: relative;
    z-index: 2;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

main {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.season-detail-panel,
.my-records-panel {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.58);
    border-radius: 12px;
}

main:has(.home-container) {
    height: calc(100vh - 117px);
    box-sizing: border-box;
    overflow: hidden;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    margin: 0 auto;
}

.login-box input {
    width: 100%;
    padding: 8px;
    margin-top: 8px;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.login-box button {
    width: 100%;
    padding: 10px;
    background-color: #0078d7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.season-card {
    background: white;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
}

.season-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        url('/static/assets/season_banners/TA.jpg') center / cover no-repeat;
    pointer-events: none;
    z-index: 0;
}

.season-card.grand-assault::before {
    background:
        url('/static/assets/season_banners/GA.jpg') center / cover no-repeat;
}

.season-card.total-assault::before {
    background:
        url('/static/assets/season_banners/TA.jpg') center / cover no-repeat;
}

.season-card-content,
.season-card>.season-delete-btn {
    position: relative;
    z-index: 1;
}

.season-card-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    color: #fff;
    position: relative;
}

.season-boss-image {
    position: absolute;
    top: 0;
    left: 0;
    right: -160px;
    bottom: 0;
    background: var(--boss-banner-image, url('/static/assets/season_banners/bina.webp')) calc(100%) center / auto 100% no-repeat;
    pointer-events: none;
    z-index: 2;
}

.season-card-info,
.season-registration-period {
    padding: 0.75rem 1rem;
    font-style: italic;
}

.season-card-info {
    min-width: 0;
    flex: 1;
    padding-left: 4rem;
    position: relative;
}

.season-card-info::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
            transparent 0,
            rgba(0, 0, 0, 0.65) 40px,
            rgba(0, 0, 0, 0.65) calc(100% - 40px),
            transparent 100%);
    transform: scaleX(0.75);
    transform-origin: left center;
    pointer-events: none;
    z-index: 1;
}

.season-card-info>* {
    position: relative;
    z-index: 3;
}


.season-card-info h3,
.season-card-info p,
.season-registration-period,
.season-registration-period span {
    color: #fff;
}

.season-card-info h3 {
    margin-top: 0;
}

.season-card-info p strong {
    font-size: 2.4rem;
}

.terrain-display {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.terrain-display img {
    width: 1.25em;
    height: 1.25em;
    object-fit: contain;
    vertical-align: middle;
}

.armor-type-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    color: #fff;
    font-style: italic;
    line-height: 1.2;
    clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%);
}

.season-detail-panel .armor-type-badge {
    font-style: normal;
    clip-path: none;
}

.armor-type-1 {
    background-color: #b52915;
}

.armor-type-2 {
    background-color: #bd8900;
}

.armor-type-4 {
    background-color: #137973;
}

.armor-type-8 {
    background-color: #216e9d;
}

.armor-type-16 {
    background-color: #9945a8;
}

.season-registration-period {
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

.season-registration-period::before {
    content: "";
    position: absolute;
    top: 0;
    right: -12px;
    bottom: 0;
    left: -12px;
    background: linear-gradient(to right,
            transparent 0,
            rgba(0, 0, 0, 0.65) 40px,
            rgba(0, 0, 0, 0.65) calc(100% - 40px),
            transparent 100%);
    pointer-events: none;
}

.season-registration-period>* {
    position: relative;
    z-index: 1;
}

.season-card:hover {
    background: #eef;
}

.season-list-heading {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    margin-bottom: 1rem;
    overflow: hidden;
    clip-path: polygon(1% 0, 100% 0, 99% 100%, 0 100%);
    background: linear-gradient(110deg, #f8fafc 0%, #f1f5f7 58%, #d9edf4 100%);
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.season-list-heading h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #364a63;
    font-size: 1.5rem;
    font-style: italic;
}

.season-list-heading-decoration {
    position: absolute;
    top: 0;
    width: 112px;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
    clip-path: polygon(19% 0, 100% 0, 80% 100%, 0 100%);
}

.season-list-heading-decoration-left {
    left: 0;
}

.season-list-heading-decoration-right {
    right: 0;
    transform: rotate(180deg);
}

.season-card.out-of-registration {
    background: #e8e8e8;
    color: #666;
}

.season-card.out-of-registration:hover {
    background: #dedede;
}

.season-card.is-activating {
    animation: season-card-activate 225ms linear;
    pointer-events: none;
}

@keyframes season-card-activate {
    0% {
        transform: scale(1);
    }

    33.333% {
        transform: scale(0.94);
    }

    100% {
        transform: scale(1.02);
    }
}

.season-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.season-registration-period {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-top: 0.75rem;
    margin-right: 1rem;
    color: #888;
    font-style: italic;
    font-size: 0.85rem;
    line-height: 1.4;
}

.record-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
}

.season-detail-title,
.season-info,
.my-records-header h2,
.my-records-header .subtitle,
#my-records-empty {
    color: #fff;
}

#sd-title {
    color: #fff;
}

#my-records-empty {
    color: #fff !important;
}

.record-action-disabled {
    color: #999;
    font-size: 0.9rem;
}

.memo-detail-row[hidden] {
    display: none;
}

.memo-detail-cell {
    padding: 8px 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    background: #fff;
}

.memo-content {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.memo-detail-box {
    flex: 1;
    min-width: 0;
    margin: 0 0 0 16px;
    padding: 12px 16px;
    background: #f8fafc;
    color: #475569;
    text-align: left;
    white-space: pre-wrap;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.memo-edit-btn {
    flex-shrink: 0;
    margin-right: 16px;
}

.memo-edit-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 16px 0;
}

.memo-edit-box textarea {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    resize: vertical;
}

.memo-detail-marker {
    margin-right: 8px;
    color: #64748b;
    font-weight: 700;
}

.record-table th,
.record-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.record-table th {
    background-color: #f2f2f2;
}

.statistics-toggle {
    display: block;
    margin: 1.5rem auto 0;
    padding: 0.6rem 1.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    cursor: pointer;
}

.season-statistics {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
}

.statistics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.statistics-header h3 {
    margin: 0;
}

.season-cutoff-box {
    grid-column: 1 / -1;
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
}

.season-cutoff-values {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.season-cutoff-values>div {
    flex: 1;
    min-width: 0;
}

.season-cutoff-values h4 {
    margin: 0 0 0.25rem;
    white-space: nowrap;
}

.season-cutoff-values ul {
    margin: 0;
    padding-left: 1.2rem;
}

.season-cutoff-values .difficulty-badge {
    color: #1f2937;
}

.statistics-cutoff-editor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.statistics-cutoff-editor label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.statistics-cutoff-editor input {
    width: 6rem;
    padding: 0.35rem;
}

.statistics-cutoff-editor select {
    min-width: 7rem;
    padding: 0.35rem;
}

.statistics-cutoff-editor button {
    min-width: 4.5rem;
    min-height: 2.25rem;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.35rem 0.8rem;
    cursor: pointer;
}

.season-cutoff-status {
    display: block;
    flex-basis: 100%;
    min-height: 1.2rem;
    margin-top: 0.15rem;
    font-size: 0.85rem;
}

.season-cutoff-status.is-saving {
    color: #fde68a;
}

.season-cutoff-status.is-success {
    color: #bbf7d0;
}

.season-cutoff-status.is-error {
    color: #fecaca;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 2rem;
    margin-top: 1rem;
}

.statistics-card {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.65);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.04);
}

.statistics-card h4 {
    margin: 0 0 0.5rem;
}

.statistics-card ul {
    margin: 0;
    padding-left: 1.2rem;
}

.statistics-card li {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.25rem 0;
}

@media (max-width: 800px) {
    .statistics-grid {
        grid-template-columns: 1fr;
    }

    .season-cutoff-values,
    .statistics-cutoff-editor {
        align-items: stretch;
        flex-direction: column;
    }
}

.statistics-card p {
    margin: 0;
}

.overall-statistics-subtitle {
    color: #fff;
}

.overall-statistics-panel h2,
.overall-statistics-panel .overall-statistics-subtitle {
    color: #fff;
}

.statistics-distribution {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 8px;
    color: #1e293b;
}

.statistics-distribution-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.statistics-distribution-header h4 {
    margin: 0 auto 0 0;
}

.statistics-distribution-header select {
    padding: 0.3rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    font: inherit;
}

.statistics-distribution-filter-label {
    margin-left: 0.25rem;
}

.statistics-distribution-season-filter {
    position: relative;
}

.statistics-distribution-season-filter summary {
    padding: 0.3rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    list-style: none;
}

.statistics-distribution-season-filter summary::-webkit-details-marker {
    display: none;
}

.statistics-distribution-season-filter summary::after {
    content: "▾";
    margin-left: 0.5rem;
    color: #64748b;
}

.statistics-distribution-season-filter[open] summary {
    border-radius: 5px 5px 0 0;
}

.statistics-distribution-season-filter[open] summary::after {
    content: "▴";
}

.statistics-distribution-season-options {
    position: absolute;
    z-index: 3;
    top: 100%;
    right: 0;
    display: flex;
    min-width: 0;
    width: max-content;
    max-width: min(28rem, calc(100vw - 2rem));
    max-height: 15rem;
    overflow-y: auto;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.6rem;
    border: 1px solid #cbd5e1;
    border-top: 0;
    border-radius: 0 0 5px 5px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.2);
}

.statistics-distribution-season-options label {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 0.15rem 0.25rem;
    color: #1e293b;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.15;
}

.statistics-distribution-season-options label:nth-child(even) {
    background: #e5e7eb;
}

.statistics-distribution-season-options input {
    flex: 0 0 auto;
    margin-top: 0.05rem;
}

.statistics-distribution-header input {
    width: 6rem;
    padding: 0.3rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    font: inherit;
}

.statistics-distribution-header input:disabled {
    background: #e2e8f0;
    cursor: not-allowed;
}

.statistics-distribution-help {
    color: #64748b;
    font-size: 0.85rem;
}

.statistics-distribution-chart {
    position: relative;
    min-height: 180px;
    overflow-x: auto;
}

.statistics-distribution-svg {
    display: block;
    width: 100%;
    min-width: 520px;
    height: auto;
}

.statistics-distribution-axis {
    stroke: #64748b;
    stroke-width: 1;
}

.statistics-distribution-grid {
    stroke: #cbd5e1;
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.statistics-distribution-tick,
.statistics-distribution-label,
.statistics-distribution-axis-label {
    fill: #364a63;
    font-size: 11px;
}

.statistics-distribution-bar {
    fill: #0078d7;
    cursor: help;
}

.statistics-distribution-bar:hover,
.statistics-distribution-bar:focus {
    fill: #005fa8;
    outline: none;
}

.statistics-distribution-tooltip {
    position: absolute;
    z-index: 1;
    max-width: 14rem;
    padding: 0.35rem 0.55rem;
    border-radius: 4px;
    background: #1e293b;
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.2;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}

.record-chart-section {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.record-chart-section h3 {
    margin: 0 0 1rem;
    color: #fff;
}

.user-record-selector {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: #fff;
}

.user-record-selector[hidden] {
    display: none;
}

.user-record-selector select {
    padding: 0.35rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    font: inherit;
}

.record-chart-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: #fff;
}

.record-chart-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.record-chart-smooth-option {
    cursor: pointer;
}

.record-chart-options select {
    padding: 0.35rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #fff;
    font: inherit;
}

.record-chart {
    min-height: 180px;
    overflow-x: auto;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 8px;
}

.record-chart-svg {
    display: block;
    width: 100%;
    min-width: 520px;
    height: auto;
}

.record-chart-axis {
    stroke: #64748b;
    stroke-width: 1;
}

.record-chart-grid {
    stroke: #cbd5e1;
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.record-chart-axis-label,
.record-chart-label,
.record-chart-tick {
    fill: #364a63;
    font-size: 12px;
}

.record-chart-label {
    cursor: help;
}

.record-chart-line {
    fill: none;
    stroke: #0078d7;
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.record-chart-point {
    fill: #0078d7;
    stroke: #fff;
    stroke-width: 2;
}

.record-chart-bar {
    fill: #0078d7;
}

.sortable-record-header {
    cursor: pointer;
    user-select: none;
}

.sortable-record-header:hover {
    background-color: #e2e8f0;
}

.sort-indicator {
    display: inline-block;
    min-width: 1em;
    margin-left: 0.2rem;
}

.record-level-max {
    color: #bf9000;
}

.record-rank-badge {
    display: inline-block;
    width: 5rem;
    box-sizing: border-box;
    padding: 0.1rem 0.35rem;
    text-align: center;
}

.record-rank-tier-1 {
    background-color: #e2b9ff;
}

.record-rank-tier-2 {
    background-color: #ffc917;
}

.record-rank-tier-3 {
    background-color: #b4c8cf;
}

.record-rank-tier-4 {
    background-color: #b67473;
}

.difficulty-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 5px;
    font-weight: 600;
}

.difficulty-normal {
    background-color: #f7ffdc;
}

.difficulty-hard {
    background-color: #ffffe1;
}

.difficulty-very-hard {
    background-color: #e1fcff;
}

.difficulty-hardcore {
    background-color: #fce8ef;
}

.difficulty-extreme {
    background-color: #fce8fc;
}

.difficulty-insane {
    background-color: #ece8fc;
}

.difficulty-torment {
    background-color: #c2d2ef;
}

.difficulty-lunatic {
    background-color: #ffb1f2;
}

.admin-table th:last-child,
.admin-table td:last-child {
    min-width: 250px;
    white-space: nowrap;
}

.admin-table th:nth-child(4),
.admin-table td:nth-child(4) {
    min-width: 130px;
    white-space: nowrap;
}

.admin-table th:nth-child(5),
.admin-table td:nth-child(5) {
    min-width: 90px;
    white-space: nowrap;
}

.admin-table th:nth-child(6),
.admin-table td:nth-child(6) {
    min-width: 70px;
    white-space: nowrap;
}

.admin-table {
    width: max-content;
    min-width: 100%;
    margin-left: 50%;
    transform: translateX(-50%);
}

.admin-schema-header {
    margin-top: 2rem;
}

.admin-backup-card {
    margin-top: 1.5rem;
}

.admin-backup-card p {
    color: #475569;
}

.admin-backup-options {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0.75rem 0;
    color: #334155;
    font-weight: 600;
}

.admin-backup-options select {
    padding: 0.35rem 0.5rem;
}

.admin-backup-import-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.actions button.admin-only-action {
    margin-left: 0.5rem;
    background-color: #f59e0b;
}

.admin-schema-relationships {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 1rem 0;
}

.admin-schema-relation {
    padding: 8px 12px;
    background: #e0f2fe;
    border: 1px solid #7dd3fc;
    border-radius: 6px;
    color: #0c4a6e;
    font-family: monospace;
    font-size: 0.85rem;
}

.admin-schema-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.admin-schema-card {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.admin-schema-card h3 {
    margin: 0;
    padding: 10px 12px;
    background: #f1f5f9;
    border-bottom: 1px solid #cbd5e1;
    font-size: 1rem;
}

.admin-schema-card ul {
    list-style: none;
    margin: 0;
    padding: 8px 12px;
}

.admin-schema-card li {
    padding: 5px 0;
    border-bottom: 1px solid #f1f5f9;
    font-family: monospace;
    font-size: 0.85rem;
}

.admin-schema-card li:last-child {
    border-bottom: none;
}

.actions {
    margin-bottom: 1rem;
}

.actions button {
    padding: 10px 15px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.actions button.record-registration-ended {
    background-color: #9ca3af;
    color: #f3f4f6;
    cursor: not-allowed;
}

.badge-admin {
    background-color: #f59e0b;
    color: white;
    font-weight: bold;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 6px;
    display: inline-block;
}

.btn-delete {
    background-color: #e53e3e;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-delete:hover {
    background-color: #c53030;
}

/* Navigation Bar */
.nav-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
}

.nav-bar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 112px;
    height: 100%;
    background: url('/static/assets/home-button-texture.png') center / cover no-repeat;
    opacity: 0.7;
    pointer-events: none;
    clip-path: polygon(19% 0, 100% 0, 80% 100%, 0 100%);
}

.nav-bar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 112px;
    height: 100%;
    background: url('/static/assets/home-button-texture.png') center / cover no-repeat;
    opacity: 0.7;
    pointer-events: none;
    clip-path: polygon(19% 0, 100% 0, 80% 100%, 0 100%);
    transform: rotate(180deg);
}

.nav-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.nav-tab {
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-tab:hover {
    color: #0078d7;
    background-color: #f8fafc;
}

.nav-tab.active {
    color: #0078d7;
    border-bottom: 3px solid #0078d7;
}

.nav-tab.admin-tab {
    color: #b45309;
}

.nav-tab.admin-tab:hover {
    color: #d97706;
    background-color: #fffbeb;
}

.nav-tab.admin-tab.active {
    color: #b45309;
    border-bottom: 3px solid #b45309;
}

.section-header {
    margin-bottom: 1.5rem;
}

.section-header h2 {
    margin-bottom: 4px;
}

.section-header:has(+ .record-form-card) h2,
.section-header:has(+ .record-form-card) .subtitle,
.admin-schema-header h2,
.admin-schema-header .subtitle {
    color: #fff;
}

.subtitle {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 0;
}

.user-count-info {
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 12px;
    font-weight: 600;
}

.badge-user {
    background-color: #e2e8f0;
    color: #475569;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 0.8rem;
    display: inline-block;
}

.btn-toggle-role {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-toggle-role:hover {
    background: #f1f5f9;
}

/* Logo Button */
.logo-btn {
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s, transform 0.15s ease;
    margin: 0;
}

.logo-btn:hover {
    opacity: 0.9;
    transform: scale(1.01);
}

/* Home Screen */
.home-container {
    max-width: 580px;
    min-height: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    transform: translateY(100px);
}

.home-hero {
    margin-bottom: 36px;
}

.home-hero h2 {
    font-size: 1.75rem;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.65);
    margin-bottom: 8px;
}

.home-hero .subtitle {
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.65);
}

.home-actions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: min(656.5px, 100%);
    margin: 0 auto;
}

.home-action-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 63px;
    padding: 0 32px;
    border: none;
    border-radius: 0;
    outline: none;
    cursor: pointer;
    position: relative;
    text-align: center;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: transparent;
    filter: drop-shadow(4px 4px 0 rgba(15, 23, 42, 0.3));
    overflow: visible;
}

.home-action-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(148, 163, 184, 0.8);
    box-sizing: border-box;
    background:
        linear-gradient(112deg, transparent 0 72%, rgba(255, 255, 255, 0.28) 72.5% 73.5%, transparent 74%),
        linear-gradient(110deg, #f8fafc 0%, #f1f5f7 58%, #d9edf4 100%);
    clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%);
    pointer-events: none;
}

.home-button-decoration {
    position: absolute;
    top: 0;
    width: 112px;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    pointer-events: none;
    z-index: 1;
    clip-path: polygon(19% 0, 100% 0, 80% 100%, 0 100%);
}

.home-button-decoration-left {
    left: 0;
}

.home-button-decoration-right {
    right: +8px;
    transform: rotate(180deg);
}

.home-action-btn.primary-action {
    background: transparent;
    color: #364a63;
}

.home-action-btn.primary-action:hover {
    transform: translateY(-2px);
    filter: drop-shadow(4px 4px 0 rgba(15, 23, 42, 0.3));
}

.home-action-btn.secondary-action {
    background: transparent;
    color: #364a63;
}

.home-action-btn.secondary-action:hover {
    transform: translateY(-2px);
    filter: drop-shadow(4px 4px 0 rgba(15, 23, 42, 0.3));
}

.home-action-btn.is-activating {
    animation: home-button-activate 690ms linear;
    pointer-events: none;
}

@keyframes home-button-activate {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    21.739% {
        transform: scale(0.94);
    }

    65.217% {
        transform: scale(1.02);
        opacity: 1;
    }

    73.913% {
        opacity: 0;
    }

    82.609% {
        opacity: 0.45;
    }

    86.956% {
        opacity: 0;
    }

    95.652% {
        opacity: 0.45;
    }

    100% {
        opacity: 0;
    }
}

.action-icon {
    display: none;
}

.action-content {
    position: absolute;
    inset: 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.action-title {
    color: #364a63;
    font-size: 24px;
    font-family: "Noto Sans", Arial, sans-serif;
    font-weight: 700;
}

.action-desc {
    display: none;
}

.action-arrow {
    display: none;
    font-weight: bold;
    margin-left: 12px;
    opacity: 0.6;
    transition: transform 0.2s, opacity 0.2s;
}

.home-action-btn:hover .action-arrow {
    transform: translateX(4px);
    opacity: 1;
}




/* Record entry form */
.record-form-card {
    background: #fff;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    padding: 1.25rem;
    margin: 1rem 0 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.admin-user-form h3 {
    margin-top: 0;
}

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

.form-grid label,
.form-field,
.record-entry-row label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
}

.form-grid input,
.form-grid select,
.form-field input,
.form-field select,
.form-field textarea,
.record-entry-row input,
.record-entry-row select {
    box-sizing: border-box;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font: inherit;
    font-weight: 400;
    background: #fff;
}

.form-field>label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
    color: #334155;
    font-size: 0.9rem;
}

.record-entry-row input:disabled {
    background: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
    opacity: 0.8;
}

.form-field input:disabled,
.form-field select:disabled {
    background: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
    opacity: 0.8;
}

.level-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.level-input-group input {
    width: 50%;
}

.level-input-group button {
    white-space: nowrap;
}

.max-level-toggle {
    background: #0078d7;
    color: #fff;
    min-width: 62px;
    padding: 11px 18px;
    border: none;
    border-radius: 10px;
}

.max-level-toggle:hover {
    background: #005a9e;
}

.max-level-toggle.is-active {
    background: #16a34a;
}

.max-level-toggle.is-active:hover {
    background: #15803d;
}

.level-input-group input:disabled {
    background: #cbd5e1;
    color: #475569;
    cursor: not-allowed;
    opacity: 0.8;
}

.form-field {
    margin-top: 1rem;
}

.record-entry-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.record-entry-row {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(140px, 1.5fr) minmax(180px, 2fr);
    align-items: end;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    margin-bottom: 10px;
}

.entry-title {
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 9px;
}

.record-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 12px 14px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 1rem;
}

.record-total strong {
    font-size: 1.2rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 1rem;
}

.form-actions button {
    padding: 9px 14px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    font-weight: 600;
}

.btn-secondary {
    background: #fff;
    border-color: #cbd5e1 !important;
    color: #334155;
}

.btn-submit {
    background: #0078d7;
    color: #fff;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.user-action-btn {
    margin: 2px;
    padding: 5px 8px;
    font-size: 0.8rem;
}

.admin-sql-statement-result {
    margin-top: 1rem;
}

.admin-sql-statement-result h3 {
    margin-bottom: 0.5rem;
}

#admin-sql-status,
#admin-sql-result h3,
#admin-sql-result p {
    color: #fff;
}

@media (max-width: 600px) {
    main {
        padding: 1rem;
    }

    .form-grid,
    .record-entry-row {
        grid-template-columns: 1fr;
    }

    .entry-title {
        padding-bottom: 0;
    }
}

/* 새 시즌 등록 - 장갑 타입 체크박스 */
.armor-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.2rem;
    margin-top: 0.4rem;
}

.armor-order-group {
    display: flex;
    gap: 8px;
    margin-top: 0.4rem;
}

.armor-order-select {
    flex: 1;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    font: inherit;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}