/* CSS Document */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

body {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

/* ======== 登录弹窗样式 ======== */
.login-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s;
}

.login-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-container {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 420px;
    animation: modalShow 0.4s ease;
}

@keyframes modalShow {
    from { transform: scale(0.8); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #185a9d;
    font-size: 1.8rem;
}

.login-container .form-group {
    margin-bottom: 20px;
}

.login-container label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.login-container input {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border 0.3s;
}

.login-container input:focus {
    border-color: #43cea2;
    outline: none;
}

.login-error {
    color: #e74c3c;
    text-align: center;
    margin-top: 12px;
    min-height: 24px;
    font-size: 0.95rem;
}

.main-content.hidden {
    display: none !important;
}

header {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: white;
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    z-index: 1;
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 700;
    position: relative;
    z-index: 2;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.nav-tabs {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #eaeaea;
    padding: 0 30px;
}

.nav-tab {
    padding: 20px 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    border-bottom: 4px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.nav-tab.active {
    border-bottom: 4px solid #43cea2;
    color: #185a9d;
    background: white;
}

.nav-tab i {
    font-size: 1.2rem;
}

.tab-content {
    padding: 40px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tab-pane.active {
    display: block;
}

.search-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e8f4fc 100%);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(67, 206, 162, 0.1);
}

.search-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #185a9d;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #185a9d;
    display: flex;
    align-items: center;
    gap: 8px;
}

input, select {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

input:focus, select:focus {
    border-color: #43cea2;
    box-shadow: 0 0 0 3px rgba(67, 206, 162, 0.2);
    outline: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    text-align: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.1);
}

.btn-search {
    align-self: end;
    margin-bottom: 8px;
}

.student-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #43cea2;
    transition: transform 0.3s, box-shadow 0.3s;
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.student-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #185a9d;
}

.student-id {
    font-size: 1.2rem;
    color: #7f8c8d;
    background: #f1f5f9;
    padding: 8px 15px;
    border-radius: 20px;
}

.student-basic-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.info-item {
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    transition: background 0.3s;
    min-height: 80px;
    justify-content: center;
}

.info-item:hover {
    background: #e8f4fc;
}

.info-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-value {
    font-size: 1rem;
    font-weight: 600;
    color: #185a9d;
}

.phone-link {
    color: #43cea2;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.phone-link:hover {
    color: #185a9d;
    text-decoration: underline;
}

.toggle-details {
    background: none;
    border: none;
    color: #43cea2;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-weight: 600;
    padding: 10px 0;
    transition: color 0.3s;
}

.toggle-details:hover {
    color: #185a9d;
}

.student-details {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #eaeaea;
    display: none;
}

.student-details.active {
    display: block;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.details-section {
    margin-bottom: 30px;
}

.details-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #185a9d;
    padding-bottom: 10px;
    border-bottom: 2px solid #eaeaea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr; /* 单行显示 */
    gap: 15px;
}

.detail-full-width {
    width: 100%;
    white-space: normal; /* 允许换行 */
    word-break: break-all; /* 长文本换行 */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card.full-width {
    grid-column: 1 / -1;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-title {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #185a9d;
    padding-bottom: 15px;
    border-bottom: 2px solid #eaeaea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-top: 20px;
}

.location-stats {
    margin-top: 15px;
}

.location-level {
    margin-bottom: 20px;
}

.location-title {
    font-weight: 600;
    margin-bottom: 12px;
    color: #185a9d;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.location-item {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.location-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;

    font-weight: 600;
}

.constellation-names {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.constellation-name-tag {
    background: #f8fafc;
    border: 1px solid #e8f4fc;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #185a9d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.constellation-name-tag i {
    color: #43cea2;
}

footer {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-size: 1rem;
    border-top: 1px solid #eaeaea;
    margin-top: 50px;
    background: #f8fafc;
}

.no-results {
    text-align: center;
    padding: 60px 40px;
    color: #7f8c8d;
    font-size: 1.2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #bdc3c7;
}

/* 家长信息样式调整 */
.parent-info-section {
    margin-top: 20px;
}

.parent-item {
    background: #f8fafc;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #43cea2;
}

.parent-header {
    font-size: 1.1rem;
    font-weight: 600;
    color: #185a9d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.parent-details {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.95rem;
}

.parent-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.parent-detail-label {
    color: #7f8c8d;
    font-weight: 500;
}

@media (max-width: 1200px) {
    .student-basic-info {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .student-basic-info {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-tabs {
        flex-direction: column;
        padding: 0;
    }
    
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .student-basic-info {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .student-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .parent-details {
        flex-direction: column;
        gap: 8px;
    }
}