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

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero {
    text-align: center;
    margin-bottom: 30px;
}

.hero h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 10px;
}

.hero p {
    color: #7f8c8d;
    font-size: 1rem;
}

.login-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    cursor: pointer;
    color: #7f8c8d;
    font-size: 1rem;
    transition: all 0.3s;
    position: relative;
}

.tab-btn.active {
    color: #3498db;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #3498db;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

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

.tab-content input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.tab-content input:focus {
    outline: none;
    border-color: #3498db;
}

.tab-content button {
    padding: 12px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

.tab-content button:hover {
    opacity: 0.9;
}

.register-link {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.register-link a {
    color: #3498db;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-row input {
    flex: 1;
}

.captcha-img {
    width: 100px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.captcha-img:hover {
    opacity: 0.8;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    display: none;
    text-align: center;
}

.hint {
    font-size: 12px;
    color: #999;
    font-weight: normal;
}

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-row input {
    flex: 1;
}

.captcha-img {
    width: 100px;
    height: 40px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.captcha-img:hover {
    opacity: 0.8;
}

.student-container, .parent-container, .admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #2c3e50, #34495e);
    color: #fff;
    padding: 20px;
    position: fixed;
    height: 100vh;
}

.sidebar .logo h2 {
    font-size: 1.2rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar .menu {
    list-style: none;
}

.sidebar .menu li {
    margin-bottom: 5px;
}

.sidebar .menu a {
    display: block;
    padding: 12px 15px;
    color: #ecf0f1;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
}

.sidebar .menu a:hover, .sidebar .menu a.active {
    background: rgba(52, 152, 219, 0.3);
    color: #fff;
}

.sidebar .menu a.logout {
    color: #e74c3c;
}

.main-content {
    margin-left: 240px;
    flex: 1;
    padding: 25px;
    background: #f5f7fa;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.top-bar h1 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.user-info span {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 25px;
    min-height: calc(100vh - 180px);
}

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

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-content {
    flex: 1;
}

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

.stat-label {
    color: #7f8c8d;
    font-size: 0.85rem;
}

.dashboard-section {
    margin-bottom: 30px;
}

.dashboard-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.btn-primary {
    padding: 10px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    padding: 10px 20px;
    background: #ecf0f1;
    color: #333;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #ddd;
}

.btn-success {
    padding: 10px 20px;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.btn-success:hover {
    opacity: 0.9;
}

.btn-back {
    padding: 8px 16px;
    background: #f5f7fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-back:hover {
    background: #eee;
}

.btn-edit {
    padding: 6px 12px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-right: 5px;
}

.btn-delete {
    padding: 6px 12px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

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

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input {
    flex: 1;
    max-width: 300px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.filter-bar {
    margin-bottom: 20px;
}

.filter-bar select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
}

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

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

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

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

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

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

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

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

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.question-list, .dimension-list, .report-list, .task-list, .children-list, .assessment-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.question-card, .dimension-card, .report-card, .task-card, .child-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3498db;
}

.dimension-card {
    border-left: none;
    border-top: 4px solid;
}

.question-header, .report-header, .task-header, .child-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.question-header h3, .report-header h3, .task-header h3, .child-info h3 {
    color: #2c3e50;
    font-size: 1rem;
}

.dimension-header {
    padding: 15px;
    border-radius: 8px 8px 0 0;
    margin: -20px -20px 15px -20px;
    color: #fff;
}

.dimension-header h3 {
    font-size: 1.1rem;
}

.options-preview {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 0.9rem;
    color: #666;
    margin: 10px 0;
}

.question-actions, .dimension-actions, .report-actions, .task-actions, .child-actions {
    margin-top: 15px;
}

.dimension-tag, .agent-tag {
    padding: 3px 8px;
    background: #3498db;
    color: #fff;
    border-radius: 4px;
    font-size: 0.75rem;
}

.assessment-intro {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.assessment-intro h2 {
    margin-bottom: 15px;
}

.assessment-intro p {
    color: #7f8c8d;
    margin-bottom: 25px;
}

.progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s;
}

.progress-text {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.question-container {
    margin-bottom: 20px;
}

.question-card {
    padding: 25px;
}

.question-card h3 {
    margin: 15px 0;
    color: #2c3e50;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-item:hover {
    border-color: #3498db;
    background: #f8f9fa;
}

.option-item input[type="radio"] {
    margin-top: 4px;
}

.navigation {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.navigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.agent-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.agent-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.agent-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.agent-card h3 {
    margin-bottom: 8px;
    color: #2c3e50;
}

.agent-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.chat-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.message {
    max-width: 70%;
    padding: 12px 15px;
    border-radius: 15px;
}

.message.student {
    align-self: flex-end;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    border-radius: 15px 15px 5px 15px;
}

.message.agent {
    align-self: flex-start;
    background: #f1f3f4;
    color: #333;
    border-radius: 15px 15px 15px 5px;
}

.message-content {
    margin-bottom: 5px;
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.7;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1rem;
}

.chat-input button {
    padding: 12px 25px;
    border-radius: 25px;
}

.checkin-page {
    max-width: 600px;
    margin: 0 auto;
}

.checkin-header {
    text-align: center;
    margin-bottom: 30px;
}

.checkin-form textarea {
    width: 100%;
    min-height: 150px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
}

.checkin-form button {
    width: 100%;
}

.checkin-list {
    margin-top: 30px;
}

.checkin-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.checkin-date {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.checkin-content {
    color: #333;
}

.report-detail-page {
    max-width: 800px;
    margin: 0 auto;
}

.report-info {
    margin-bottom: 30px;
}

.student-info {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.student-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.radar-chart-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.radar-chart-container canvas {
    width: 300px !important;
    height: 300px !important;
}

.dimension-scores {
    margin-bottom: 30px;
}

.scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.score-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border-top: 4px solid;
}

.score-header {
    padding: 12px;
    color: #fff;
    text-align: center;
    font-weight: 500;
}

.score-value {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 15px 0 5px;
    color: #2c3e50;
}

.score-bar {
    height: 8px;
    background: #eee;
    margin: 0 15px;
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 4px;
}

.score-percent {
    text-align: center;
    color: #7f8c8d;
    font-size: 0.85rem;
    padding: 8px 0 15px;
}

.report-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.section ul {
    list-style: none;
}

.section li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.section li:last-child {
    border-bottom: none;
}

.child-selector {
    margin-bottom: 25px;
}

.child-selector select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    min-width: 200px;
}

.progress-chart {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.progress-summary {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stats-row {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.loading {
    text-align: center;
    color: #7f8c8d;
    padding: 20px;
}

.status {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.status.pending {
    background: #f39c12;
    color: #fff;
}

.status.completed {
    background: #2ecc71;
    color: #fff;
}

.avg-score {
    color: #3498db;
    font-weight: 500;
}

.overview-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.overview-item {
    background: #fff;
    border-radius: 10px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.child-profile {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

.child-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
}

@media (max-width: 768px) {
    .student-container, .parent-container, .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        padding: 15px;
    }
    
    .sidebar .menu {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .sidebar .menu li {
        margin-bottom: 0;
    }
    
    .sidebar .menu a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
}
