/* ================================================
 * 招生查询系统 - 现代UI样式
 * Modern Admission Query System Stylesheet
 * ================================================ */

/* ---- Reset & Base ---- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
    background: #f0f2f5;
    min-height: 100vh;
}

a {
    color: #2563eb;
    text-decoration: none;
    transition: color .2s ease;
}

a:hover {
    color: #1d4ed8;
}

ul, li {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ---- Header ---- */
.site-header {
    position: relative;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #3b82f6 100%);
    color: #fff;
    padding: 0;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.25);
    overflow: hidden;
}

.site-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.site-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.header-inner {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
    padding: 28px 20px 22px;
    text-align: center;
}

.header-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
}

.header-logo svg {
    width: 32px;
    height: 32px;
    fill: #fff;
}

.header-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-subtitle {
    font-size: 13px;
    opacity: 0.85;
    margin: 0;
    font-weight: 400;
}

/* ---- Navigation ---- */
.nav-bar {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    padding: 0 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-inner a {
    flex-shrink: 0;
    padding: 14px 18px;
    font-size: 14px;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    transition: all .2s ease;
    white-space: nowrap;
    font-weight: 500;
}

.nav-inner a:hover {
    color: #2563eb;
    background: #eff6ff;
}

.nav-inner a.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

/* ---- Main Container ---- */
.main-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

/* ---- Card ---- */
.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px 24px 12px;
    border-bottom: 1px solid #f3f4f6;
}

.card-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h2 .icon {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    border-radius: 8px;
    color: #2563eb;
}

.card-header h2 .icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.card-header .subtitle {
    font-size: 13px;
    color: #9ca3af;
    margin: 6px 0 0;
}

.card-body {
    padding: 24px;
}

/* ---- Form ---- */
.form-group {
    margin-bottom: 22px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #1f2937;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all .2s ease;
    outline: none;
    -webkit-appearance: none;
}

.form-control::placeholder {
    color: #9ca3af;
}

.form-control:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.form-control:focus {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form-control.input-error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-control.input-error:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

.form-error {
    font-size: 13px;
    color: #ef4444;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Input with icon */
.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    fill: #9ca3af;
    pointer-events: none;
    transition: fill .2s ease;
}

.input-wrapper .form-control {
    padding-left: 44px;
}

.input-wrapper:focus-within .input-icon {
    fill: #2563eb;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all .2s ease;
    outline: none;
    -webkit-appearance: none;
    text-decoration: none;
    vertical-align: middle;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-success {
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #047857, #059669);
    color: #fff;
    transform: translateY(-1px);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 16px;
}

/* ---- Alert Messages ---- */
.alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ---- Result Display ---- */
.result-list {
    padding: 0;
    margin: 0;
}

.result-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    flex-shrink: 0;
    width: 120px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    padding-top: 1px;
}

.result-value {
    flex: 1;
    font-size: 15px;
    color: #1f2937;
    font-weight: 500;
    word-break: break-all;
}

.result-value.highlight {
    color: #2563eb;
    font-weight: 600;
}

.result-value.success {
    color: #059669;
}

/* Result card with accent */
.result-card {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.result-card .result-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #10b981;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
}

.result-card .result-badge svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ---- Tabs ---- */
.tab-bar {
    display: flex;
    background: #f3f4f6;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 24px;
}

.tab-bar .tab {
    flex: 1;
    padding: 10px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s ease;
    border: none;
    background: none;
}

.tab-bar .tab.active {
    background: #fff;
    color: #2563eb;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---- Info Banner ---- */
.info-banner {
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border-left: 4px solid #2563eb;
    border-radius: 0 10px 10px 0;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #1e40af;
    line-height: 1.7;
}

.info-banner strong {
    font-weight: 600;
}

/* ---- Divider ---- */
.divider {
    height: 1px;
    background: #f3f4f6;
    margin: 24px 0;
}

.divider-text {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: #9ca3af;
    font-size: 13px;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider-text span {
    padding: 0 16px;
}

/* ---- Action Bar ---- */
.action-bar {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.action-bar .btn {
    flex: 1;
}

/* ---- EMS Tracking Box ---- */
.tracking-box {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 16px;
}

.tracking-box .tracking-number {
    font-size: 22px;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 2px;
    margin: 8px 0;
    font-family: "Courier New", monospace;
}

.tracking-number-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 8px 0;
}

.tracking-number-row .tracking-number {
    margin: 0;
    word-break: break-all;
}

/* Copy button */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.copy-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.copy-btn:hover {
    background: #dbeafe;
    border-color: #93c5fd;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #059669;
}

.copy-btn.copy-fail {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
}

.tracking-box .tracking-label {
    font-size: 13px;
    color: #6b7280;
}

.tracking-box .btn {
    margin-top: 12px;
}

/* ---- Footer ---- */
.site-footer {
    text-align: center;
    padding: 30px 16px;
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.8;
}

.site-footer p {
    margin: 0;
}

.site-footer .footer-links {
    margin-bottom: 10px;
}

.site-footer .footer-links a {
    color: #6b7280;
    margin: 0 8px;
}

.site-footer .footer-links a:hover {
    color: #2563eb;
}

/* ---- Loading Spinner ---- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-overlay.show {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeInUp 0.4s ease-out;
}

.alert {
    animation: fadeInUp 0.3s ease-out;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .header-title {
        font-size: 19px;
    }

    .header-subtitle {
        font-size: 12px;
    }

    .header-inner {
        padding: 22px 16px 18px;
    }

    .header-logo {
        width: 52px;
        height: 52px;
    }

    .card-body {
        padding: 18px;
    }

    .card-header {
        padding: 16px 18px 10px;
    }

    .result-label {
        width: 90px;
        font-size: 13px;
    }

    .result-value {
        font-size: 14px;
    }

    .nav-inner a {
        padding: 12px 14px;
        font-size: 13px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .tracking-box .tracking-number {
        font-size: 18px;
    }

    .tracking-number-row {
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ---- Hidden ---- */
.hidden {
    display: none !important;
}

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-danger { color: #ef4444; }
.text-success { color: #059669; }
.text-warning { color: #d97706; }
.text-muted { color: #9ca3af; }
mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
