* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
.header {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8eaed;
}

.logo {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.logo-box {
    background: #e53e3e;
    color: white;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    line-height: 1.2;
    text-align: center;
    margin-right: 20px;
    border-radius: 8px;
}

.logo h1 {
    color: #1a1a1a;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 1px;
}

.search-section {
    display: flex;
    justify-content: center;
}

.search-box {
    display: flex;
    background: #f8f9fa;
    border: 2px solid #e8eaed;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #ff6b35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-box input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.search-box input::placeholder {
    color: #6c757d;
}

.search-box button {
    background: #ff6b35;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

/* Results section styles */
.results-section {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8eaed;
}

.results-title {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 22px;
    font-weight: 600;
    position: relative;
}

.results-title::before {
    content: '📦';
    margin-right: 10px;
    font-size: 20px;
}

.results-table {
    overflow: hidden;
}

.table-header {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e8eaed;
}

.header-item {
    padding: 18px 20px;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.time-header {
    flex: 1;
    border-right: 1px solid #e8eaed;
    position: relative;
}

.time-header::before {
    content: '🕐';
    margin-right: 8px;
}

.tracking-header {
    flex: 2;
    position: relative;
}

.tracking-header::before {
    content: '📍';
    margin-right: 8px;
}

.table-body {
    background: white;
}

.tracking-row {
    display: flex;
    border-bottom: 1px solid #f1f3f4;
    min-height: 90px;
    align-items: stretch;
    transition: all 0.3s ease;
    position: relative;
}

.tracking-row:hover {
    background: #f8f9fa;
}

.tracking-row:last-child {
    border-bottom: none;
}

/* Latest update styles */
.tracking-row.latest-update {
    background: linear-gradient(135deg, #fff3e0, #ffe8cc);
    border-left: 4px solid #ff6b35;
    position: relative;
}

.tracking-row.latest-update::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ff6b35, #e55a2b);
}

.tracking-row.latest-update .time-cell {
    color: #d84315;
    font-weight: 600;
}

.latest-badge {
    background: linear-gradient(135deg, #ff6b35, #e55a2b);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 12px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.time-cell {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    border-right: 1px solid #f1f3f4;
    background: #fafbfc;
    position: relative;
}

.time-cell::before {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: linear-gradient(180deg, transparent, #e8eaed, transparent);
}

.tracking-cell {
    flex: 2;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    font-size: 15px;
    line-height: 1.6;
    color: #2c3e50;
    position: relative;
}

.tracking-cell::before {
    content: '•';
    color: #ff6b35;
    font-size: 20px;
    margin-right: 15px;
    font-weight: bold;
}

/* Query summary styles */
.query-summary {
    background: #f8f9fa;
    border-top: 1px solid #e8eaed;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.summary-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
    font-weight: 500;
}

.summary-value {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}

/* Status styles */
.no-results, .loading {
    background: #ffffff;
    border-radius: 12px;
    padding: 50px 40px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8eaed;
    margin-top: 20px;
}

.no-results p, .loading p {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
    line-height: 1.6;
}

.no-results::before {
    content: '📭';
    display: block;
    font-size: 48px;
    margin-bottom: 20px;
}

.loading::before {
    content: '🔍';
    display: block;
    font-size: 48px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading p {
    color: #ff6b35;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }
    
    .header {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
        margin-bottom: 25px;
    }
    
    .logo-box {
        margin-right: 0;
        margin-bottom: 15px;
        width: 60px;
        height: 60px;
        font-size: 12px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 8px;
        max-width: 100%;
    }
    
    .search-box input {
        border-bottom: 1px solid #e8eaed;
        border-radius: 8px 8px 0 0;
        padding: 18px 20px;
        font-size: 16px;
    }
    
    .search-box button {
        border-radius: 0 0 8px 8px;
        padding: 18px 30px;
        font-size: 16px;
    }
    
    .results-title {
        font-size: 20px;
        padding: 18px;
    }
    
    .table-header {
        display: none; /* Hide table header, use card layout */
    }
    
    .tracking-row {
        flex-direction: column;
        min-height: auto;
        border-radius: 8px;
        margin-bottom: 15px;
        border: 1px solid #e8eaed;
        overflow: hidden;
    }
    
    .tracking-row:last-child {
        margin-bottom: 0;
    }
    
    .tracking-row.latest-update {
        border-left: none;
        border-top: 4px solid #ff6b35;
    }
    
    .tracking-row.latest-update::before {
        display: none;
    }
    
    .time-cell {
        border-right: none;
        border-bottom: 1px solid #f1f3f4;
        background: #f8f9fa;
        padding: 15px;
        text-align: center;
        flex: none;
    }
    
    .time-cell::before {
        display: none;
    }
    
    .tracking-cell {
        padding: 20px;
        text-align: left;
        flex: none;
    }
    
    .tracking-cell::before {
        margin-right: 12px;
    }
    
    .latest-badge {
        margin-left: 0;
        margin-top: 10px;
        display: block;
        width: fit-content;
    }
    
    .no-results, .loading {
        padding: 40px 20px;
        margin-top: 15px;
    }
    
    .no-results::before, .loading::before {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .query-summary {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .summary-item {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .summary-label {
        margin-bottom: 0;
        margin-right: 10px;
    }
}

/* Extra small screen optimization */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 15px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .search-box input, .search-box button {
        padding: 16px 18px;
        font-size: 15px;
    }
    
    .results-title {
        font-size: 18px;
        padding: 15px;
    }
    
    .time-cell {
        padding: 12px;
        font-size: 14px;
    }
    
    .tracking-cell {
        padding: 15px;
        font-size: 14px;
    }
    
    .latest-badge {
        font-size: 10px;
        padding: 3px 10px;
    }
}
