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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container h1 {
    color: white;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

#loginForm {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.hint {
    color: white;
    margin-top: 20px;
    font-size: 14px;
    opacity: 0.9;
}

/* 评价页面样式 */
header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    color: #667eea;
    font-size: 1.8rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    font-weight: bold;
    color: #555;
}

#viewMyEvaluationsBtn {
    background: #3498db;
    padding: 8px 20px;
    font-size: 14px;
}

#logoutBtn, #logoutBtn2 {
    background: #e74c3c;
    padding: 8px 20px;
    font-size: 14px;
}

#backToEvaluationBtn {
    background: #95a5a6;
    padding: 8px 20px;
    font-size: 14px;
}

main {
    padding: 20px;
}

/* 排行榜样式 */
.ranking-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.ranking-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.ranking-section h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ranking-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ranking-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 15px;
    color: white;
}

.ranking-item:nth-child(1) .ranking-number {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.ranking-item:nth-child(2) .ranking-number {
    background: linear-gradient(135deg, #C0C0C0, #808080);
}

.ranking-item:nth-child(3) .ranking-number {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.ranking-item:nth-child(n+4) .ranking-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.ranking-info {
    flex: 1;
}

.ranking-name {
    font-weight: bold;
    color: #333;
    margin-bottom: 3px;
}

.ranking-stats {
    font-size: 12px;
    color: #666;
}

.ranking-rate {
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    color: #1a1a2e;
    background: #e8ecf0;
}

/* 个人统计图表样式 */
.personal-stats {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.personal-stats h4 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
}

.personal-stats .chart-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.personal-stats canvas {
    max-height: 250px;
}

.evaluations-section h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.chart-container {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chart-container h3 {
    color: #333;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.1rem;
}

.chart-container canvas {
    max-height: 300px;
}

.evaluation-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.evaluation-container h2 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.5rem;
}

.evaluation-notice {
    background: #fff8e1;
    border-left: 4px solid #f39c12;
    color: #7d5a00;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.my-evaluations-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 800px;
    margin: 0 auto;
}

.my-evaluations-container h2 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 1.8rem;
}

.my-evaluations-container .personal-stats {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
}

.my-evaluations-container .personal-stats h3 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.my-evaluations-container .evaluations-section h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

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

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

.evaluation-row {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.3s;
}

.evaluation-row:hover {
    background: #e9ecef;
}

.evaluation-row.completed {
    background: #d4edda;
}

.evaluation-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    margin-right: 20px;
    flex-shrink: 0;
}

.evaluation-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    min-width: 120px;
    margin-right: 30px;
}

.evaluation-options {
    display: flex;
    flex: 1;
}

.star-rating {
    display: flex;
    gap: 6px;
}

.star-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid #ddd;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.15s;
    user-select: none;
    background: white;
    color: #999;
}

.star-label input[type="radio"] {
    display: none;
}

.star-label[data-score="1"]:hover,
.star-label[data-score="1"].selected { background: #e74c3c; border-color: #e74c3c; color: white; }
.star-label[data-score="2"]:hover,
.star-label[data-score="2"].selected { background: #e67e22; border-color: #e67e22; color: white; }
.star-label[data-score="3"]:hover,
.star-label[data-score="3"].selected { background: #f39c12; border-color: #f39c12; color: white; }
.star-label[data-score="4"]:hover,
.star-label[data-score="4"].selected { background: #2ecc71; border-color: #2ecc71; color: white; }
.star-label[data-score="5"]:hover,
.star-label[data-score="5"].selected { background: #27ae60; border-color: #27ae60; color: white; }

.comment-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-left: 20px;
    font-family: inherit;
}

.comment-input:focus {
    outline: none;
    border-color: #667eea;
}

.submit-section {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.submit-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.progress-info {
    margin-top: 15px;
    font-size: 16px;
    color: #555;
}

.progress-info strong {
    color: #667eea;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    font-size: 1.3rem;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.rating-options {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: space-around;
}

.rating-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.rating-option input[type="radio"] {
    display: none;
}

.rating-label {
    display: block;
    padding: 15px 10px;
    border-radius: 8px;
    border: 2px solid #ddd;
    transition: all 0.3s;
    font-weight: bold;
}

.rating-option input[type="radio"]:checked + .rating-label {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.rating-label.good {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.rating-label.neutral {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.rating-label.bad {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.comment-section {
    margin-top: 20px;
}

.comment-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.comment-section textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.comment-section textarea:focus {
    outline: none;
    border-color: #667eea;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer button {
    padding: 10px 20px;
}

#saveEvaluation {
    background: #27ae60;
}

#cancelEvaluation {
    background: #95a5a6;
}

/* 评价列表样式 */
.evaluation-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.evaluation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.evaluator-name {
    font-weight: bold;
    color: #333;
}

.evaluation-rating {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.evaluation-rating.good {
    background: #27ae60;
}

.evaluation-rating.neutral {
    background: #f39c12;
}

.evaluation-rating.bad {
    background: #e74c3c;
}

.evaluation-comment {
    color: #666;
    line-height: 1.5;
}

.evaluation-time {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .classmates-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .rating-options {
        flex-direction: column;
        gap: 10px;
    }
    
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
    }
}
