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

:root {
    --primary-color: #1B4B78;  /* 教育蓝 */
    --secondary-color: #2A80B9; /* 浅教育蓝 */
    --accent-color: #E8F1F8;   /* 淡蓝背景 */
    --success-color: #2E7D32;  /* 教育绿 */
    --warning-color: #ED6C00;  /* 警告橙 */
    --danger-color: #C62828;   /* 错误红 */
    --text-color: #333333;     /* 主文本色 */
    --text-light: #666666;     /* 次要文本 */
    --border-color: #D0D9E6;   /* 边框色 */
    --background-color: #F5F9FC; /* 背景色 */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.card-header h1 {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
}

form {
    padding: 20px;
}

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

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
}

input,
select {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(42, 128, 185, 0.1);
}

.location-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.info-item i {
    color: #6c5ce7;
    width: 20px;
}

.map-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
}

button {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

button:hover:not(:disabled) {
    background: var(--primary-color);
    transform: translateY(-1px);
}

button:disabled {
    background: #b2bec3;
    cursor: not-allowed;
}

.message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message.error {
    background: #fff5f5;
    color: #c0392b;
    border: 1px solid #fab1a0;
}

.message.success {
    background: #f0fff4;
    color: #27ae60;
    border: 1px solid #55efc4;
}

.section-title {
    font-size: 18px;
    font-weight: 500;
    color: #2d3436;
    margin: 25px 0 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c5ce7;
}

.info-content {
    flex: 1;
}

.info-label {
    font-size: 14px;
    color: #718096;
    margin-bottom: 4px;
}

.location-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    color: #6c5ce7;
    width: 20px;
    margin-top: 3px;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .section-title {
        font-size: 16px;
        margin: 20px 0 12px;
    }

    .form-group label {
        font-size: 14px;
    }

    .info-label {
        font-size: 13px;
    }
}

.refresh-button {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.3s ease;
}

.refresh-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.refresh-button i {
    font-size: 16px;
}

.card-header {
    position: relative;
}

/* 弹窗样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.modal-header i {
    font-size: 24px;
    margin-right: 12px;
}

.modal-header.success i {
    color: var(--success-color);
}

.modal-header.error i {
    color: var(--danger-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    margin: 0;
}

.modal-content {
    color: var(--text-color-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

.modal-btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.modal-btn.primary {
    background: var(--secondary-color);
    color: white;
}

.modal-btn.primary:hover {
    background: var(--primary-color);
}

.notice {
    background: var(--accent-color);
    padding: 15px 20px;
    margin: 20px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notice i {
    color: var(--warning-color);
    font-size: 20px;
    margin-top: 2px;
}

.notice p {
    margin: 0;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
}

.footer {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}

.copyright {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
}

.copyright p {
    margin: 5px 0;
}

.copyright strong {
    color: var(--primary-color);
}

.school-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    color: var(--text-color);
    background-color: white;
    margin-top: 4px;
}

.school-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.school-distance {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.school-select option[data-in-range="true"] {
    color: var(--success-color);
}

.school-select option[data-in-range="false"] {
    color: var(--danger-color);
}

.location-accuracy {
    font-size: 12px;
    color: var(--success-color);
    margin-top: 4px;
}

.location-accuracy.warning {
    color: var(--warning-color);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
} 