* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    background: #f5f7fa;
    padding: 20px;
}

.report-container {
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 30px;
}

.uin-input-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.uin-input-section h3 {
    margin-bottom: 15px;
    color: #2d3748;
}

.input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

#uinInput {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 250px;
    font-size: 16px;
}

#fetchReportBtn {
    padding: 10px 25px;
    background: #4299e1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

#fetchReportBtn:hover {
    background: #3182ce;
}

.report-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.report-header h1 {
    font-size: 28px;
    color: #2d3748;
    margin-bottom: 10px;
}

.core-conclusion {
    font-size: 16px;
    color: #4a5568;
    line-height: 1.6;
    background: #f0f8fb;
    padding: 15px 20px;
    border-radius: 8px;
    display: inline-block;
}

.section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    color: #2d3748;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 4px solid #4299e1;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.data-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.3s;
}

.data-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.data-card .label {
    font-size: 14px;
    color: #718096;
    margin-bottom: 8px;
}

.data-card .value {
    font-size: 22px;
    color: #2d3748;
    font-weight: 600;
}

.value.excellent {
    color: #48bb78;
}

.value.green {
    color: #38b2ac;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2d3748;
}

tr:hover {
    background: #fafafa;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-top: 8px;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
}

.score-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
}

.tag-excellent {
    background: #e6fffa;
    color: #38b2ac;
}

.tag-green {
    background: #e8f4f8;
    color: #4299e1;
}

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #718096;
    font-size: 14px;
}

.radar-chart-container {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    height: 400px;
}

.loading {
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: #718096;
}

.error-message {
    text-align: center;
    padding: 30px;
    font-size: 16px;
    color: #e53e3e;
    background: #fef7fb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* 澶勭綒璁板綍鏍峰紡 */
.punishment-list {
    display: grid;
    gap: 15px;
}

.punishment-card {
    background: #fff5f5;
    border-left: 4px solid #e53e3e;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.punishment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}

.punishment-index {
    color: #e53e3e;
}

.punishment-game {
    color: #2d3748;
}

.punishment-content {
    color: #4a5568;
    line-height: 1.6;
}

.punishment-status {
    margin-bottom: 8px;
    padding: 8px;
    background: #fef2f2;
    border-radius: 4px;
}

.punishment-status span {
    color: #e53e3e;
    font-weight: 600;
}

.punishment-reason {
    font-size: 14px;
}

/* 娓告垙琛ㄦ牸涓殑澶勭綒鏍囪 */
.has-punishment {
    background: #fff8f8;
}

.punishment-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
}

/* 鍗遍櫓鐘舵€佹牱寮 */
.value.danger {
    color: #e53e3e;
}

.tag-danger {
    background: #fee2e2;
    color: #dc2626;
}

.text-danger {
    color: #e53e3e;
    font-weight: 600;
}

/* --- Modal and Controls Styles --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); display: flex;
    justify-content: center; align-items: center; z-index: 1000;
    opacity: 1; transition: opacity 0.3s ease;
}
.modal-overlay.hidden { opacity: 0; pointer-events: none; }
.modal-content {
    background-color: white; padding: 25px; border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); text-align: center;
    max-width: 90%; width: 350px; position: relative;
    transform: scale(1); transition: transform 0.3s ease;
}
.modal-overlay.hidden .modal-content { transform: scale(0.9); }
.modal-close {
    position: absolute; top: 10px; right: 15px; font-size: 28px;
    font-weight: bold; color: #aaa; cursor: pointer;
}
.modal-close:hover { color: #333; }
.modal-content h2 { margin-top: 0; color: #333; font-size: 20px; }
.modal-content p { color: #666; margin-bottom: 15px; }
.qq-qr-code { width: 150px; height: 150px; margin: 10px auto; display: block; border: 1px solid #eee; border-radius: 8px;}
.modal-content strong { color: #d9534f; }
#copyGroupNumberBtn {
    background-color: #5cb85c; color: white; border: none;
    padding: 10px 20px; border-radius: 5px; cursor: pointer;
    font-size: 16px; margin-top: 10px; transition: background-color 0.2s;
}
#copyGroupNumberBtn:hover { background-color: #4cae4c; }

.top-controls {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1001;
    display: flex;
    gap: 10px;
}

#themeToggleBtn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#themeToggleBtn:hover {
    background-color: rgba(0,0,0,0.1);
}

#screenshotBtn {
    padding: 8px 16px;
    border: 1px solid #ccc;
    background-color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

#screenshotBtn:hover {
    background-color: #f0f0f0;
    border-color: #aaa;
}

#screenshotBtn.hidden {
    display: none;
}

/* --- Dark Mode Styles --- */
body.dark-mode {
    background-color: #1a202c;
    color: #e2e8f0;
}

body.dark-mode .report-container {
    background-color: #2d3748;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .uin-input-section h3,
body.dark-mode .section-title,
body.dark-mode .report-header h1,
body.dark-mode .punishment-game {
    color: #f7fafc;
}

body.dark-mode .core-conclusion,
body.dark-mode .footer {
    color: #cbd5e0;
}

body.dark-mode .uin-input-section {
    background: #2d3748;
}

body.dark-mode #uinInput {
    background-color: #4a5568;
    color: #edf2f7;
    border-color: #718096;
}
body.dark-mode #uinInput::placeholder {
    color: #a0aec0;
}

body.dark-mode #fetchReportBtn {
    background-color: #3182ce;
}
body.dark-mode #fetchReportBtn:hover {
    background-color: #4299e1;
}

body.dark-mode .data-card {
    background-color: #4a5568;
    border-color: #718096;
}
body.dark-mode .data-card .label {
    color: #a0aec0;
}
body.dark-mode .data-card .value {
    color: #edf2f7;
}

body.dark-mode table {
    color: #e2e8f0;
}
body.dark-mode th, body.dark-mode td {
    border-color: #4a5568;
}
body.dark-mode th {
    background: #4a5568;
    color: #f7fafc;
}
body.dark-mode tr:hover {
    background: #4a5568;
}

body.dark-mode .report-header,
body.dark-mode .footer {
    border-color: #4a5568;
}
body.dark-mode .core-conclusion {
    background: #313c4f;
}
body.dark-mode #comprehensiveEvaluation {
    background: #1a202c;
    color: #a0aec0;
}

body.dark-mode .punishment-card {
    background: #4c3030;
    border-left-color: #f56565;
}
body.dark-mode .punishment-status {
    background: #5c3a3a;
}
body.dark-mode .punishment-content,
body.dark-mode .punishment-index {
    color: #fbb6b6;
}
body.dark-mode .has-punishment {
    background: #4c3030;
}
body.dark-mode .punishment-badge,
body.dark-mode .tag-danger {
    background: #c53030;
    color: white;
}
body.dark-mode .text-danger,
body.dark-mode .value.danger {
    color: #f56565;
}

body.dark-mode .error-message {
    background: #5c3a3a;
    color: #fbb6b6;
}

body.dark-mode #themeToggleBtn:hover {
    background-color: rgba(255,255,255,0.15);
}
body.dark-mode #screenshotBtn {
    background-color: #2d3748;
    color: #63b3ed;
    border-color: #63b3ed;
}
body.dark-mode #screenshotBtn:hover {
    background-color: #63b3ed;
    color: #1a202c;
}

body.dark-mode .modal-content {
    background-color: #2d3748;
}
body.dark-mode .modal-content h2,
body.dark-mode .modal-content p,
body.dark-mode .modal-content strong {
    color: #e2e8f0;
}