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

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #f59e0b;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --success: #10b981;
    --error: #ef4444;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.05) 1px, transparent 0);
    background-size: 20px 20px;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部 */
header {
    text-align: center;
    padding: 40px 20px 30px;
    animation: fadeInDown 0.6s ease;
}

header h1 {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

/* 主内容 */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 0;
}

/* 查询卡片 */
.query-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.6s ease 0.1s both;
    border: 1px solid var(--border-color);
}

.error-message {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    border-left: 4px solid var(--error);
    animation: shake 0.5s;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    padding-right: 45px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s;
    background: #fff;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
    font-size: 1.1rem;
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25);
}

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

.loading-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 结果卡片 */
.result-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    display: none;
    animation: fadeIn 0.5s ease;
    border: 1px solid var(--border-color);
}

.result-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f3f4f6;
}

.success-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--success);
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.student-name {
    font-size: 1.75rem;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.admission-id {
    color: var(--text-light);
    font-size: 0.9rem;
    font-family: monospace;
    background: #f3f4f6;
    padding: 6px 16px;
    border-radius: 6px;
    display: inline-block;
}

/* 信息网格 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.info-item {
    background: #f9fafb;
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.info-item.full-width {
    grid-column: 1 / -1;
}

.info-label {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.info-value {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
    word-break: break-all;
}

.info-value.highlight {
    color: var(--primary);
    font-size: 1.2rem;
}

.tracking-item {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left-color: var(--secondary);
}

.tracking-number {
    font-family: monospace;
    font-size: 1.3rem;
    color: var(--primary);
    letter-spacing: 1px;
}

.tracking-hint {
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 温馨提示 */
.tips-section {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    margin-bottom: 24px;
}

.tips-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.tips-icon {
    width: 36px;
    height: 36px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.tips-content {
    display: grid;
    gap: 16px;
}

.tip-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tip-number {
    min-width: 26px;
    height: 26px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}

.tip-text {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 0.95rem;
}

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

/* 联系信息 */
.contact-info {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px dashed #d1d5db;
}

.contact-title {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: rgba(30, 64, 175, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.contact-value {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

/* 按钮组 */
.back-btn {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
    flex-wrap: wrap;
}

.btn-secondary {
    padding: 12px 24px;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

/* 页脚 */
footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 40px;
}

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

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

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

/* 打印样式 */
@media print {
    .query-card, .back-btn, footer { 
        display: none !important; 
    }
    .result-card { 
        display: block !important; 
        box-shadow: none;
        border: 1px solid #000;
        max-width: 100%;
    }
    body { 
        background: white; 
    }
    .container {
        max-width: 100%;
    }
}

/* 响应式 */
@media (max-width: 640px) {
    .container {
        padding: 15px;
    }
    
    header {
        padding: 30px 15px 20px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .query-card, .result-card {
        padding: 24px;
        border-radius: 12px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .student-name {
        font-size: 1.4rem;
    }
}