/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 20px 0 40px 0;
}

.header-content h1 {
    color: #2d3748;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    animation: slideInDown 1s ease-out;
}

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

.header-content h1 i {
    margin-right: 15px;
    color: #2563eb;
}

.subtitle {
    color: #6b7280;
    font-size: 1.2rem;
    font-weight: 300;
}

/* 搜索区域 */
.search-section {
    margin-bottom: 40px;
}

.search-container {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
    animation: slideInUp 0.8s ease-out 0.3s both;
    margin-bottom: 20px;
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    border: 1px solid #f1f5f9;
}

#searchInput {
    width: 100%;
    padding: 18px 60px 18px 20px;
    border: 2px solid #e8ecf4;
    border-radius: 16px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    color: #2d3748;
}

#searchInput:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1), 0 4px 20px rgba(37, 99, 235, 0.15);
    background: #ffffff;
    transform: translateY(-1px);
}

.clear-btn {
    position: absolute;
    right: 56px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    overflow: hidden;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #2563eb;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 12px rgba(37, 99, 235, 0.25);
}

.search-btn:hover {
    background: #1d4ed8;
    transform: translateY(-50%) translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.search-btn:active {
    transform: translateY(-50%) translateY(0);
}

.clear-btn:hover {
    background: #f1f5f9;
    color: #2563eb;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.clear-btn.show {
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.3s ease;
}

/* 自动联想样式 */
.autocomplete-container {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 4px;
}

.autocomplete-list {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    max-height: 300px;
    overflow-y: auto;
    animation: slideDown 0.2s ease;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: #f8fafc;
    border-left: 3px solid #2563eb;
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.autocomplete-item:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.autocomplete-iata {
    background: #2563eb;
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85em;
    min-width: 42px;
    text-align: center;
}

.autocomplete-info {
    flex: 1;
}

.autocomplete-name {
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}

.autocomplete-location {
    color: #64748b;
    font-size: 0.9em;
    margin-top: 2px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#searchInput:not(:placeholder-shown) + .clear-btn {
    opacity: 1;
    visibility: visible;
}



/* 按钮基础样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.5);
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    box-shadow: 0 4px 15px rgba(107, 114, 128, 0.3);
}

.btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 25px rgba(107, 114, 128, 0.4);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    animation: fadeIn 0.8s ease-out;
}

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

.pagination button {
    padding: 10px 15px;
    border: 2px solid #2563eb;
    background: white;
    color: #2563eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.pagination button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s ease;
}

.pagination button:hover::before {
    left: 100%;
}

.pagination button:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.pagination button.active {
    background: #2563eb;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

/* 联机搜索区域 */
.online-search-section {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    background: #f3f4f6;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
    animation: fadeIn 0.5s ease-out;
}

.online-search-hint {
    color: #6b7280;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 500;
}

.online-search-btn {
    background: #10b981;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.online-search-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* 结果区域 */
.results-section {
    margin-bottom: 40px;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-size: 1.2rem;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.search-results::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.6);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

.airport-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.airport-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    border-color: #4f46e5;
}

.airport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.iata-code {
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.airport-type {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.airport-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.airport-location {
    color: #7f8c8d;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.airport-location i {
    color: #4f46e5;
}

.airport-icao {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 8px;
    font-style: italic;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* 统计区域 */
.stats-section {
    margin-bottom: 40px;
}

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

.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    animation: slideInUp 0.8s ease-out;
}

.stat-card.compact {
    padding: 18px;
}

.stat-card.compact i {
    font-size: 1.8rem;
}

.stat-card.compact .stat-number {
    font-size: 1.8rem;
}

.stat-card.compact .stat-label {
    font-size: 0.85rem;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-card i {
    font-size: 2.5rem;
    color: #4f46e5;
    margin-bottom: 15px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 页脚 */
.footer {
    text-align: center;
    padding: 30px 0;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 16px;
    margin-top: 40px;
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: #6b7280;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #4f46e5;
    transform: translateY(-2px);
}

/* 通知组件 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
    transform: translateX(100%) scale(0.8);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
}

/* 通知操作按钮 */
.notification-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.notification-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.notification-btn.primary {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

/* 进度通知样式 */
.progress-notification {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #2563eb;
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.4);
    animation: progressShimmer 1.5s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-percent {
    font-size: 0.85rem;
    text-align: right;
    opacity: 0.9;
}

/* 工具提示样式 */
.custom-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    z-index: 10000;
    pointer-events: none;
    animation: tooltipFadeIn 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

.tooltip-top::before {
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: rgba(0, 0, 0, 0.9);
}

.tooltip-bottom::before {
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

.tooltip-left::before {
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: rgba(0, 0, 0, 0.9);
}

.tooltip-right::before {
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: rgba(0, 0, 0, 0.9);
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.notification::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    animation: shimmerNotification 2s ease-in-out infinite;
}

@keyframes shimmerNotification {
    0% { left: -100%; }
    100% { left: 100%; }
}

.notification.show {
    transform: translateX(0) scale(1);
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: translateX(100%) scale(0.3);
        opacity: 0;
    }
    50% {
        transform: translateX(-10px) scale(1.05);
    }
    70% {
        transform: translateX(5px) scale(0.95);
    }
    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.notification-content {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 15px;
    border-left: 5px solid #4caf50;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.notification.error .notification-content {
    border-left-color: #f44336;
    box-shadow: 0 15px 40px rgba(244, 67, 54, 0.3);
}

.notification.warning .notification-content {
    border-left-color: #ff9800;
    box-shadow: 0 15px 40px rgba(255, 152, 0, 0.3);
}

.notification.info .notification-content {
    border-left-color: #2196f3;
    box-shadow: 0 15px 40px rgba(33, 150, 243, 0.3);
}

.notification-icon {
    font-size: 1.5rem;
    color: #4caf50;
}

.notification.error .notification-icon {
    color: #f44336;
}

.notification.warning .notification-icon {
    color: #ff9800;
}

.notification.info .notification-icon {
    color: #2196f3;
}

.notification-message {
    flex: 1;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(8px);
    animation: fadeInModal 0.4s ease-out;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
    }
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-content {
    background: #ffffff;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    transform: scale(0.8);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 25px 70px rgba(0,0,0,0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
}

@keyframes slideInModal {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 25px 30px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.modal-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #dc3545;
    transform: rotate(90deg) scale(1.1);
}

.modal-close:hover::before {
    transform: scale(1);
}

.modal-body {
    padding: 25px 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.6);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

/* 工具类 */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .search-container {
        padding: 20px;
    }
    
    .search-filters {
        grid-template-columns: 1fr;
    }
    
    .search-results {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .airport-card {
        padding: 20px;
    }
    
    .airport-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}