/* 用户端现代化官网风格样式 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    color: #212529;
    background-color: #ffffff;
    line-height: 1.6;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========== 导航栏 ========== */
.navbar {
    background-color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 10px 0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: auto !important;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.navbar-brand {
    font-size: 18px !important;
    font-weight: 600;
    color: #007bff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0 !important;
    margin: 0 !important;
}

.navbar-brand:hover {
    color: #0056b3 !important;
}

.navbar-nav {
    display: flex !important;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    flex-direction: row !important;
}

.nav-link {
    color: #495057 !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 6px 12px !important;
    border-radius: 6px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: #f8f9fa;
    color: #007bff !important;
}

/* ========== Hero 区域 ========== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 100px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-search {
    max-width: 720px;
    margin: 0 auto;
}

.hero-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    align-items: stretch;
}

.hero-search-input {
    flex: 1;
    min-width: 200px;
    padding: 14px 16px 14px 48px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    height: 48px;
    line-height: 1.5;
}

.hero-search-input::placeholder {
    color: #adb5bd;
}

.hero-search-input:focus {
    outline: 0;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.hero-search-select {
    padding: 14px 16px;
    padding-right: 40px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    min-width: 140px;
    background-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s;
    height: 48px;
    line-height: 1.5;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.hero-search-select:focus {
    outline: 0;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.hero-search-btn {
    padding: 14px 32px;
    white-space: nowrap;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    transition: all 0.2s;
    height: 48px;
    border: none;
    cursor: pointer;
}

.hero-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6ee8 0%, #6c3aed 100%);
}

.hero-search-hint {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    line-height: 1.6;
}

.hero-search .search-input-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.hero-search .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 16px;
    pointer-events: none;
    z-index: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 18px;
}

.btn-primary {
    background-color: #fff;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-outline-primary:hover {
    background-color: #fff;
    color: #667eea;
}

/* ========== 功能特性区域 ========== */
.features-section {
    padding: 80px 20px;
    background-color: #f8f9fa;
}

.features-section .row {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.features-section .col-md-4 {
    display: flex;
    flex: none !important;
    max-width: none !important;
    width: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}


.section-heading {
    font-size: 36px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 50px;
}

.feature-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
    color: #fff;
}

.feature-title {
    font-size: 22px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 15px;
}

.feature-desc {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.feature-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}

.feature-link:hover {
    color: #0056b3;
}

/* ========== 页脚 ========== */
.footer {
    background-color: #212529;
    color: #fff;
    padding: 30px 20px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

/* ========== 查询页 /user/track ========== */
.track-page {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.track-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.search-box-header {
    margin-bottom: 24px;
}

.track-title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
}

.track-desc {
    color: #6c757d;
    margin: 0;
    font-size: 14px;
}

.track-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

.search-input-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    pointer-events: none;
}

.track-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1px solid #ced4da;
    border-radius: 10px;
    font-size: 15px;
    background-color: #fff;
    transition: all 0.2s;
}

.track-input:focus {
    border-color: #667eea;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    transform: translateY(-1px);
}

.track-select {
    padding: 12px 14px;
    border: 1px solid #ced4da;
    border-radius: 10px;
    font-size: 15px;
    min-width: 130px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.track-select:focus {
    border-color: #667eea;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.track-btn {
    padding: 12px 28px;
    white-space: nowrap;
    border-radius: 10px;
    font-weight: 600;
}

.track-results {
    border-top: 1px solid #eee;
    padding-top: 24px;
}

.result-section {
    margin-bottom: 28px;
}

.result-section:last-child {
    margin-bottom: 0;
}

.result-heading {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 12px;
}

.table-wrap {
    overflow-x: auto;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.result-table th,
.result-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.result-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.result-table tbody tr:hover {
    background: #f8f9fa;
}

.result-link {
    color: #007bff;
    text-decoration: none;
}

.result-link:hover {
    text-decoration: underline;
}

.logistics-meta {
    font-size: 14px;
    color: #495057;
    margin-bottom: 12px;
}

.logistics-meta .ms-3 { margin-left: 0.75rem; }

.logistics-tracks {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.logistics-tracks li {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.logistics-tracks li:last-child {
    border-bottom: none;
}

.track-time {
    color: #6c757d;
    margin-right: 10px;
    font-size: 13px;
}

/* ========== 登录/注册页面 ========== */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
    background: linear-gradient(160deg, #e8ecf4 0%, #dce1e9 50%, #f2f4f8 100%);
}

.auth-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-card .btn-primary {
    background: linear-gradient(135deg, #5b6ee8 0%, #7c3aed 100%);
    color: #fff !important;
    border: none;
}

.auth-card .btn-primary:hover {
    filter: brightness(1.08);
    box-shadow: 0 4px 16px rgba(92, 110, 232, 0.45);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: #fff;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

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

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

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

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: #667eea;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert-danger {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffecb5;
    color: #856404;
}

.auth-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-search-form {
        flex-direction: column;
    }
    
    .hero-search .search-input-wrapper {
        min-width: 100%;
    }
    
    .hero-search-select {
        min-width: 100%;
    }
    
    .section-heading {
        font-size: 28px;
    }
    
    .features-section .row {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 30px 20px;
    }
    
    .track-form {
        flex-direction: column;
    }
    
    .search-input-wrapper {
        min-width: 100%;
    }
    
    .track-select {
        min-width: 100%;
    }
}

/* ========== 工具类 ========== */
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-5 { margin-bottom: 3rem; }

.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }

.ms-1 { margin-left: 0.25rem; }

.g-3 { gap: 1rem; }
.g-4 { gap: 1.5rem; }

/* 确保row和col正确显示 */
.row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -15px;
    margin-right: -15px;
}

.col-md-4,
.col-md-6 {
    padding-left: 15px;
    padding-right: 15px;
    position: relative;
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
    }
    
    .col-md-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}
