/* ===== 全局CSS重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 全局容器样式 */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== UI组件通用样式 ===== */

/* 按钮组件 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    min-height: 48px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* 主要按钮 - 统一红色渐变样式 */
.btn-primary {
    background: linear-gradient(135deg, #DC143C 0%, #B91C3C 50%, #A01729 100%);
    color: #FFFFFF;
    border-color: rgba(220, 20, 60, 0.3);
    box-shadow: 
        0 4px 15px rgba(220, 20, 60, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #F01E47 0%, #DC143C 50%, #B91C3C 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(220, 20, 60, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    border-color: rgba(220, 20, 60, 0.5);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 
        0 2px 10px rgba(220, 20, 60, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* 次要按钮 - 统一透明白色样式 */
.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.12);
}

/* 轮廓按钮 - 统一透明白色样式（与btn-secondary相同） */
.btn-outline {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.btn-outline:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-outline:active:not(:disabled) {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.12);
}

/* 文本按钮 */
.btn-text {
    background: none;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.btn-text:hover:not(:disabled) {
    background: rgba(220, 20, 60, 0.1);
    transform: none;
}

/* 危险按钮 */
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 
        0 4px 15px rgba(239, 68, 68, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #f87171, #ef4444);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(239, 68, 68, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* 成功按钮 */
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 
        0 4px 15px rgba(16, 185, 129, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #34d399, #10b981);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* 按钮图标样式优化 */
.btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.btn:hover:not(:disabled) i {
    transform: scale(1.1);
}

/* 按钮焦点状态 */
.btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(220, 20, 60, 0.3),
        0 4px 15px rgba(220, 20, 60, 0.2);
}

/* 导航栏按钮样式已统一使用全局定义 */

/* 按钮尺寸 */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
}

/* 位置选择按钮特殊样式 */
.btn-location {
    white-space: nowrap;
    flex-shrink: 0;
    min-width: auto;
    font-size: 0.9rem;
    padding: 0.8rem 1.2rem;
}

/* 圆形按钮 */
.btn-circle {
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

.btn-circle.btn-sm {
    width: 2rem;
    height: 2rem;
}

.btn-circle.btn-lg {
    width: 3rem;
    height: 3rem;
}

/* 搜索栏内的圆形按钮特殊样式 */
.search-bar .btn-circle {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    min-height: 40px;
    font-size: 1rem;
}

.search-bar .btn-circle:hover:not(:disabled) {
    transform: translateY(-50%) translateY(-2px);
}

/* 加载状态按钮 */
.btn-loading {
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 输入框组件 */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-label.required::after {
    content: '*';
    color: white;
    margin-left: 4px;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.form-input.error {
    border-color: #ef4444;
}

.form-input.success {
    border-color: #10b981;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

/* 复选框和单选框 */
.form-checkbox,
.form-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.form-checkbox input,
.form-radio input {
    width: 18px;
    height: 18px;
    accent-color: white;
}

/* 错误消息 */
.form-error {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #ef4444;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-success {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 模态框组件 */
/* 已移除全局.modal定义，避免覆盖页面特定模态框样式 */

/* 消息提示组件 */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    max-width: 400px;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 1001;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-content {
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.toast-text {
    color: #666;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    margin-left: 0.5rem;
}

/* 标签组件 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 1rem;
    white-space: nowrap;
}

.badge-primary {
    background: #DC143C;
    color: white;
}

.badge-secondary {
    background: #6b7280;
    color: white;
}

.badge-success {
    background: #10b981;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

.badge-info {
    background: #3b82f6;
    color: white;
}

.badge-light {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e9ecef;
}

/* 进度条组件 */
.progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #DC143C, #B91C3C);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        transparent 25%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.1) 50%, 
        rgba(255, 255, 255, 0.1) 75%, 
        transparent 75%);
    background-size: 20px 20px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

/* 分页组件 */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 2rem;
}

.pagination-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-item:hover {
    border-color: white;
    color: white;
}

.pagination-item.active {
    background: #DC143C;
    border-color: white;
    color: white;
}

.pagination-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 导航标签 */
.nav-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.nav-tab {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    color: white;
}

.nav-tab.active {
    color: white;
    border-bottom-color: white;
}

/* 手风琴组件 */
.accordion {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid #e5e7eb;
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item.active .accordion-content {
    padding: 1.5rem;
    max-height: 1000px;
}

/* 工具提示 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
}

.tooltip:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: white;
}

.dropdown-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 0.5rem 0;
}

/* 响应式工具类 */
@media (max-width: 768px) {
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .toast {
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .dropdown-menu {
        left: auto;
        right: 0;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-height: 42px;
    }
    
    .hero-actions .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* 辅助类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }

/* 禁用动画的样式 */
.no-animations * {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
    transform: none;
} 