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

/* CSS变量定义 */
:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius-lg: 0.75rem;
    --radius-md: 0.5rem;
    --transition: all 0.3s ease;
}

/* 基础样式 */
body {
    background: var(--bg-gradient);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    padding: 20px 0;
    color: var(--text-primary);
    line-height: 1.6;
}

/* 容器样式 */
.container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 主容器样式 */
.main-container {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

/* 头部样式 */
.header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.header-logo {
    width: 6rem;
    height: 6rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-sm);
}

.header-logo svg {
    width: 48px;
    height: 48px;
    fill: white;
}

.header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* 通知卡片 */
.notification-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 1px solid #fcd34d;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.notification-card h4 {
    color: #92400e;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.notification-card h4 i {
    margin-right: 0.5rem;
}

.notification-card p {
    color: #b45309;
    font-size: 0.875rem;
    margin-bottom: 0;
}

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

.search-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.search-input {
    width: 100%;
    height: 3.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--primary);
    padding: 0 3rem 0 4rem;
    font-size: 1rem;
    font-weight: 400;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
    outline: none;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    height: 2.75rem;
    padding: 0 1.5rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    cursor: pointer;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--shadow-sm);
}

/* 订单号格式说明 */
.format-guide {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.format-guide h5 {
    color: #1e40af;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.format-guide h5 i {
    margin-right: 0.5rem;
}

.format-guide ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.format-guide li {
    color: #3b82f6;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.format-guide li i {
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

.format-guide code {
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    color: #dc2626;
}

/* 特别说明 */
.special-note {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.special-note h3 {
    color: #b91c1c;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
}

.special-note h3 svg {
    color: #b91c1c;
}

.note-content {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #dc2626;
}

.note-content p {
    margin-bottom: 1rem;
    text-align: justify;
}

.note-content p:last-child {
    margin-bottom: 0;
}

/* 加载状态 */
.loading-container {
    display: none;
    text-align: center;
    padding: 3rem 0;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 错误提示 */
.error-alert {
    display: none;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.error-alert i {
    color: #ef4444;
    margin-right: 0.5rem;
}

/* 订单结果 */
.order-result {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.order-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 2rem;
}

.order-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1.5rem;
}

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

.order-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
}

.order-title i {
    margin-right: 0.5rem;
}

.order-number {
    font-size: 0.875rem;
    opacity: 0.8;
}

.order-amount {
    font-size: 1.875rem;
    font-weight: 700;
}

/* 状态徽章 */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.status-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.status-pending {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* 订单详情 */
.order-details {
    padding: 1.5rem;
    background: white;
}

.detail-row {
    display: flex;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    flex: 0 0 8rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.detail-label i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.detail-value {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.detail-value code {
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
}

.copy-btn {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-left: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 支付方式 */
.payment-type {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
}

.payment-type i {
    margin-right: 0.5rem;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f9fafb;
    border-top: 1px solid var(--border-color);
}

.action-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.action-btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: white;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-danger {
    background: white;
    color: var(--danger);
    border-color: var(--danger);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    border: 2px dashed var(--border-color);
    transition: var(--transition);
}

.empty-state:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, #eff6ff 0%, #f3f4f6 100%);
}

.empty-state-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

.empty-state h5 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* 历史记录 */
.history-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.history-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.history-title i {
    color: var(--primary);
    margin-right: 0.5rem;
}

.history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.history-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.history-badge:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.history-badge i {
    margin-right: 0.5rem;
    font-size: 0.75rem;
}

/* 页脚 */
.footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* 复制成功提示 */
.copy-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    display: none;
    align-items: center;
}

.copy-toast i {
    margin-right: 0.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 1rem 0;
    }
    
    .main-container {
        padding: 1.5rem;
        margin: 0 1rem;
        border-radius: var(--radius-lg);
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .header-logo {
        width: 5rem;
        height: 5rem;
    }
    
    .header-logo svg {
        width: 40px;
        height: 40px;
    }
    
    .search-input {
        padding-right: 2rem;
        height: 3rem;
    }
    
    .search-btn {
        position: static;
        transform: none;
        width: 100%;
        margin-top: 1rem;
    }
    
    .order-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .order-amount {
        margin-top: 0.5rem;
        font-size: 1.5rem;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-label {
        flex: none;
        margin-bottom: 0.25rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .action-buttons > div {
        display: flex;
        gap: 0.75rem;
        width: 100%;
    }
    
    .action-btn {
        flex: 1;
        justify-content: center;
    }
    
    .copy-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

/* 初始隐藏状态 */
#loadingContainer, #orderResult, #errorAlert, #copyToast {
    display: none;
}