:root {
    --primary-blue: #0047bb;
    --secondary-blue: #2a6edc;
    --background: #f4f6fb;
    --text-dark: #202124;
    --text-muted: #667085;
    --white: #ffffff;
    --accent: #00cf8a;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 71, 187, 0.1);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Header */
.header {
    background: var(--primary-blue);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.container-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

#logo-img {
    height: 36px;
    border-radius: 4px;
}

.logo-text {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}

.menu-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-icon span {
    width: 28px;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
}

/* Search Section (Hero) */
.search-section {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    padding: 60px 0 100px;
    color: var(--white);
    text-align: center;
}

.page-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 30px;
    font-weight: 600;
}

.search-box {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 8px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    outline: none;
    color: var(--text-dark);
    background: transparent;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 0 30px;
    border-radius: calc(var(--radius-md) - 4px);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: #003a9c;
    transform: translateY(-2px);
}

/* Result Section Adjustments */
.result-section {
    position: relative;
    z-index: 10;
    margin-top: -60px; /* 让结果卡片与 Hero 重叠 */
    padding-bottom: 60px;
}

.tracking-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tracking-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    animation: fadeIn 0.6s ease-out;
}

.order-info-header {
    border-bottom: 2px solid var(--background);
    padding-bottom: 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.order-id-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: block;
}

.order-id-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.waybill-tag {
    background: rgba(0, 71, 187, 0.1);
    color: var(--primary-blue);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.waybill-tag:hover {
    background: rgba(0, 71, 187, 0.15);
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: #e1e4e8;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

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

.timeline-node {
    position: absolute;
    left: -30px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: #cdd4dc;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.active .timeline-node {
    background: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(0, 71, 187, 0.1);
}

.timeline-content {
    background: transparent;
}

.timeline-status {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.timeline-item.active .timeline-status {
    color: var(--primary-blue);
}

.timeline-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* States & Loading */
.hidden {
    display: none !important;
}

.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 71, 187, 0.1);
    border-top: 3px solid var(--primary-blue);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

.empty-state {
    text-align: center;
    padding: 100px 0;
    color: var(--text-muted);
}

.empty-state img {
    margin-bottom: 20px;
    opacity: 0.6;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    .search-section {
        padding: 40px 0 80px;
    }
    .search-box {
        flex-direction: row; /* H5端保持横向 */
        background: var(--white);
        box-shadow: var(--shadow-sm);
        padding: 4px;
    }
    .search-box input {
        padding: 10px 12px;
    }
    .btn-primary {
        padding: 0 15px;
        min-width: 70px;
    }
    .result-section {
        margin-top: -40px;
    }
    .tracking-card {
        padding: 20px;
    }
    .order-info-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}
