* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
}

.alert {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert.error {
    background-color: #ffebee;
    color: #c62828;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input[type="text"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

button, .btn {
    padding: 10px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover, .btn:hover {
    background-color: #2980b9;
}

.rating-container {
    margin-top: 30px;
    text-align: center;
}

.value-display {
    font-size: 36px;
    font-weight: bold;
    margin: 20px 0;
    color: #3498db;
}

.slider-container {
    margin: 30px 0;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    margin-bottom: 20px;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

.slider::-moz-range-thumb {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #3498db;
    cursor: pointer;
}

.labels {
    display: flex;
    justify-content: space-between;
    margin-top: -15px;
    color: #666;
    font-size: 14px;
}

/* 后台样式 */
.admin-header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.actions {
    margin-bottom: 20px;
}

.ratings-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.ratings-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.ratings-table tr:hover {
    background-color: #f5f5f5;
}

.score-0 { color: #e74c3c; }
.score-1 { color: #e67e22; }
.score-2 { color: #f1c40f; }
.score-3 { color: #2ecc71; }
.score-4, .score-5 { color: #27ae60; }

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    background-color: #e74c3c;
}

.logout-btn:hover {
    background-color: #c0392b;
}

/* 添加以下样式到现有文件 */

.admin-nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
}

.admin-nav a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.admin-nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

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

.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.btn:hover {
    background-color: #2980b9;
}

.btn.danger {
    background-color: #e74c3c;
}

.btn.danger:hover {
    background-color: #c0392b;
}

.alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* 可视化页面特定样式 */
.stats-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
}

.chart-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.data-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

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

.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

.existing-score {
    margin: 15px 0;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 5px;
    color: #1976d2;
    font-size: 16px;
}

.existing-score span {
    font-weight: bold;
    font-size: 20px;
}
.rating-status {
    padding: 12px 20px;
    margin: 15px 0;
    background: #e8f5e9;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    color: #2e7d32;
    font-size: 16px;
    transition: all 0.3s ease;
}

.rating-status.updated {
    background: #fff3e0;
    border-color: #FFC107;
    color: #ef6c00;
}

/* 状态提示框 */
.rating-status {
    padding: 12px 20px;
    margin: 20px 0;
    border-radius: 8px;
    background: #e3f2fd;
    color: #1976d2;
    border: 2px solid #90caf9;
    font-size: 16px;
    transition: all 0.3s ease;
}

.rating-status.updated {
    background: #fff3e0;
    border-color: #ffcc80;
    color: #ef6c00;
}

.rating-status span {
    font-weight: bold;
    font-size: 18px;
}

/* 提交按钮动态样式 */
.submit-btn.updating {
    background-color: #FFC107;
}

.submit-btn.updating:hover {
    background-color: #ffb300;
}
/* 状态提示 */
.status-box {
    padding: 12px;
    margin: 15px 0;
    border-radius: 6px;
    background: #fff3e0;
    color: #ef6c00;
    border: 2px solid #ffb74d;
    font-size: 16px;
}

/* 禁用状态 */
input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

button.disabled {
    background: #bdbdbd !important;
    cursor: not-allowed;
}

button.active {
    background: #4CAF50;
    transition: background 0.3s;
}

button.active:hover {
    background: #45a049;
}