:root {
    --bg: #061006;
    --panel: rgba(3, 20, 6, 0.88);
    --panel-2: rgba(6, 28, 10, 0.92);
    --line: #4e7f12;
    --line-soft: rgba(121, 173, 33, 0.35);
    --text: #ffa800;
    --text-soft: #d7c98e;
    --green: #84b520;
    --green-dark: #2d4a0b;
    --yellow: #f0b52d;
    --orange: #d89518;
    --danger: #c64a34;
    --info: #7fbf2a;
    --shadow: 0 0 18px rgba(0,0,0,0.35);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.60)),
        url('https://data.thc-game.com/img/bg.jpg') center center / cover fixed no-repeat;
}

a {
    color: var(--yellow);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

body.thc-body {
    min-height: 100vh;
}

.thc-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
}

.thc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.thc-brand {
    min-width: 320px;
}

.thc-brand img {
    max-width: 100%;
    height: auto;
    display: block;
}


.thc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.thc-nav a {
    display: inline-block;
    padding: 14px 22px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: rgba(9, 26, 8, 0.95);
    color: var(--yellow);
    box-shadow: var(--shadow);
    font-weight: bold;
    text-decoration: none;
}

.thc-nav a:hover {
    background: rgba(18, 40, 12, 0.98);
    border-color: var(--green);
    text-decoration: none;
}

.thc-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

.thc-main,
.thc-sidebar {
    min-width: 0;
}

.thc-panel {
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 24px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.thc-panel-title {
    margin: 0 0 18px 0;
    font-size: 24px;
    color: var(--yellow);
    border-bottom: 1px solid var(--line-soft);
    padding-bottom: 12px;
}

.thc-table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.thc-table th,
.thc-table td {
    border: 1px solid rgba(121, 173, 33, 0.32);
    padding: 14px 12px;
    vertical-align: middle;
    overflow-wrap: anywhere;
    word-break: normal;
}

.thc-table th {
    color: var(--yellow);
    font-size: 16px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.16);
}

.thc-table td {
    color: var(--text);
}

.thc-table tr.detail-row td {
    background: rgba(0,0,0,0.18);
    color: var(--text-soft);
}

.thc-table tr:hover td {
    background: rgba(91, 132, 20, 0.08);
}

.thc-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thc-btn,
button,
input[type="submit"] {
    display: inline-block;
    padding: 10px 18px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(to bottom, #18340d, #102809);
    color: var(--yellow);
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow);
}

.thc-btn:hover,
button:hover,
input[type="submit"]:hover {
    background: linear-gradient(to bottom, #224512, #16340d);
    text-decoration: none;
}

.thc-btn-secondary {
    color: var(--text);
}

.thc-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,0.18);
    color: var(--text);
    font-size: 13px;
}

.thc-status-active {
    color: var(--info);
    font-weight: bold;
}

.thc-status-busy {
    color: var(--yellow);
    font-weight: bold;
}

.thc-status-warning {
    color: var(--yellow);
    font-weight: bold;
}

.thc-status-ended {
    color: var(--orange);
    font-weight: bold;
}

.thc-status-archived {
    color: #d7d7d7;
    font-weight: bold;
}

.thc-status-danger {
    color: #ff7a64;
    font-weight: bold;
}

.thc-meta-list {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px 12px;
}

.thc-meta-list .label {
    color: var(--text);
}

.thc-meta-list .value {
    color: var(--yellow);
    font-weight: bold;
    text-align: right;
}

.thc-note {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(5, 28, 8, 0.9);
    border: 2px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 18px 20px;
    margin-top: 24px;
}

.thc-note-title {
    margin: 0 0 6px 0;
    color: var(--yellow);
    font-size: 18px;
}

.thc-form-group {
    margin-bottom: 16px;
}

.thc-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: bold;
}

.thc-form-group input,
.thc-form-group select,
.thc-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
}

.thc-alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
    background: rgba(0,0,0,0.18);
}

.thc-alert-success {
    color: #bff38a;
    border-color: #5f9d1b;
}

.thc-alert-error {
    color: #ff9d8b;
    border-color: #a63b2c;
}

.thc-footer {
    text-align: center;
    margin-top: 26px;
    color: var(--text-soft);
    font-size: 14px;
}

.archive-profile-card {
    display: grid;
    grid-template-columns: minmax(260px, 420px) 1fr;
    gap: 20px;
    align-items: start;
}

.archive-subtitle {
    color: var(--text-soft);
    line-height: 1.5;
}

.archive-subheading {
    margin: 16px 0 8px;
    font-size: 16px;
    font-weight: bold;
    color: var(--yellow);
}

.archive-muted {
    display: block;
    margin-top: 4px;
    color: var(--text-soft);
}

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

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

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

.archive-stat {
    min-height: 86px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
}

.archive-stat span,
.archive-stat small {
    display: block;
    color: var(--text-soft);
    line-height: 1.35;
}

.archive-stat b {
    display: block;
    margin-top: 6px;
    color: var(--yellow);
    font-size: 22px;
}

.archive-skill-cell b {
    display: inline-block;
    min-width: 64px;
    color: var(--yellow);
}

.archive-skillbar {
    height: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.28);
}

.archive-skillbar span {
    display: block;
    height: 100%;
    background: linear-gradient(to right, var(--green-dark), var(--green), var(--yellow));
}

.archive-table {
    margin-top: 10px;
}

.archive-table th {
    width: 45%;
    text-align: left;
}

.archive-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.archive-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.archive-badge img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

@media (max-width: 1100px) {
    .thc-layout {
        grid-template-columns: 1fr;
    }

    .archive-profile-card,
    .archive-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 700px) {
    .thc-page {
        padding: 14px;
    }

    .thc-header {
        flex-direction: column;
    }

    .thc-nav {
        justify-content: flex-start;
    }

    .thc-panel {
        padding: 14px;
    }

    .thc-table {
        display: table;
        width: max-content;
        min-width: 100%;
        max-width: none;
        border-collapse: collapse;
        border-spacing: 0;
    }

    .thc-table th,
    .thc-table td {
        padding: 10px 8px;
        font-size: 13px;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }

    .thc-table th[colspan],
    .thc-table td[colspan] {
        width: 100%;
    }

    .archive-stat-grid {
        grid-template-columns: 1fr;
    }
}

.thc-checklist {
    margin: 12px 0 0;
    padding-left: 22px;
}

.thc-checklist li {
    margin: 7px 0;
}

.thc-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    margin-top: 6px;
}

.thc-alert-danger {
    color: #ff9d8b;
    border-color: #a63b2c;
}

.thc-btn-danger {
    color: #ff9d8b;
    border-color: #a63b2c;
    background: linear-gradient(to bottom, #3b150f, #250d09);
}

.thc-btn-danger:hover {
    background: linear-gradient(to bottom, #552015, #36120d);
}
