/* =============================================
   AI Store - Novel/Tailwind/shadcn 极简风格
   深浅主题无缝切换，无装饰、功能优先
   ============================================= */

/* ========== 字体 ========== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ========== CSS 变量 ========== */
:root {
    --bg: #ffffff;
    --bg-secondary: #fafafa;
    --text: #09090b;
    --text-secondary: #71717a;
    --text-muted: #a1a1aa;
    --border: #e9e9e7;
    --border-hover: #d4d4d4;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.1);
    --success: #16a34a;
    --warning: #ca8a04;
    --error: #dc2626;
    --hover-bg: #f4f4f5;
    --radius: 8px;
    --radius-sm: 6px;
    --shadow: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dark {
    --bg: #09090b;
    --bg-secondary: #18181b;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: #27272a;
    --border-hover: #3f3f46;
    --accent: #818cf8;
    --accent-hover: #a5b4fc;
    --accent-soft: rgba(129, 140, 248, 0.15);
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --hover-bg: #18181b;
    --shadow: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

/* ========== 基础重置 ========== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ========== 滚动条 ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* .theme-toggle 在 header 区域统一定义 */
/* ========== 顶部导航 - 全新设计 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 32px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    flex: 1;
    display: flex;
    align-items: center;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 2px;
    transition: opacity 0.15s;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    margin-right: 8px;
}

.logo-dot {
    color: var(--accent);
}

.header-center {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border);
}

.nav-tab {
    padding: 8px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--text);
    background: var(--bg);
}

.nav-tab.active {
    color: var(--text);
    background: var(--bg);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--border-hover);
    transform: scale(1.05);
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--border-hover);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 16px;
        height: 56px;
    }
    
    .header-center {
        display: none;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .logo-icon {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}

/* ========== 顶部导航 - 仿51xueai风格 (使用主样式变量) ========== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.025em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    opacity: 0.85;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.logo-dot {
    color: #6366f1;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.nav-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--radius-lg) - 2px);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--text);
    background: var(--bg);
}

.nav-tab.active {
    color: #6366f1 !important;
    background: var(--bg) !important;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--border-hover);
}

.icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--border-hover);
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 1rem;
        height: 3.5rem;
    }
    
    .header-center {
        display: none;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.875rem;
    }
}

/* ========== 顶部导航 - 仿51xueai风格 (使用主样式变量) ========== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.025em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    opacity: 0.85;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.logo-dot {
    color: #6366f1;
}

.header-center {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.nav-tab {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: calc(var(--radius-lg) - 2px);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--text);
    background: var(--bg);
}

.nav-tab.active {
    color: #6366f1 !important;
    background: var(--bg) !important;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--border-hover);
}

.icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: var(--bg-secondary);
    color: var(--text);
    border-color: var(--border-hover);
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 1rem;
        height: 3.5rem;
    }
    
    .header-center {
        display: none;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo-icon {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.875rem;
    }
}


/* ========== 加载状态 ========== */
.loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    color: var(--text-muted);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== 空状态 ========== */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ========== 商品卡片增强 ========== */
.product-card {
    position: relative;
}

.product-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-card-icon.google { background: rgba(66, 133, 244, 0.1); }
.product-card-icon.openai { background: rgba(16, 163, 74, 0.1); }
.product-card-icon.grok { background: rgba(0, 0, 0, 0.05); }

/* ========== 复制按钮 ========== */
.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.copy-btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

.copy-btn.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* ========== 主内容留白 ========== */
.main {
    max-width: 100%;
    margin: 0 auto;
    padding: 2.5rem 5% 5rem;
}

@media (max-width: 1024px) {
    .main { padding: 2rem 3% 4rem; }
}

@media (max-width: 768px) {
    .main { padding: 1.5rem 1rem 4rem; }
}

.products-header {
    margin-bottom: 24px;
}

.products-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.products-title span {
    color: var(--text-muted);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0 0.5rem;
}

/* ========== 商品卡片 ========== */
.product-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.product-card:hover {
    border-color: var(--ui-accent, #6366f1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.product-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.product-card-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.product-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.product-card-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.product-card-price-unit {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ========== 加载与空状态 ========== */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* ========== 订单查询 ========== */
.order-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}

.order-section-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.order-form {
    display: flex;
    gap: 8px;
    max-width: 480px;
}

.order-input {
    flex: 1;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    transition: border-color 0.15s;
}

.order-input:focus {
    outline: none;
    border-color: var(--accent);
}

.order-input::placeholder {
    color: var(--text-muted);
}

.order-btn {
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.order-btn:hover {
    background: var(--hover-bg);
    border-color: var(--border-hover);
}

/* ========== 订单结果 ========== */
.order-result {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

.order-result.show {
    display: block;
}

.order-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

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

.order-result-label {
    color: var(--text-secondary);
}

.order-result-value {
    color: var(--text);
    font-weight: 500;
}

.order-result-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.order-result-status.success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.order-result-status.pending {
    background: rgba(202, 138, 4, 0.1);
    color: var(--warning);
}

.order-result-status.error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error);
}

.order-result-card {
    margin-top: 12px;
    padding: 12px;
    background: var(--text);
    border-radius: var(--radius-sm);
}

.order-card-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.order-card-key {
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 13px;
    color: #86efac;
    word-break: break-all;
    line-height: 1.6;
}

/* ========== 弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.show {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.modal-dialog {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-md);
    animation: modalIn 0.15s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(-4px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
}

.modal-close:hover {
    background: var(--hover-bg);
    color: var(--text);
}

.modal-body {
    padding: 20px;
}

/* ========== 下单表单 ========== */
.modal-product-info {
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.modal-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.modal-product-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.modal-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.modal-price-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
}

.modal-price-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ========== 按钮 ========== */
.btn-primary {
    height: 36px;
    padding: 0 20px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    height: 36px;
    padding: 0 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--border-hover);
}

/* ========== 支付弹窗 ========== */
.pay-info {
    text-align: center;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.pay-order-num {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pay-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
}

.pay-methods {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.pay-method {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.pay-method:hover {
    border-color: var(--border-hover);
    background: var(--hover-bg);
}

.pay-method input {
    display: none;
}

.pay-method input:checked + .pay-method-content {
    color: var(--accent);
}

.pay-method-content {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pay-btn-full {
    width: 100%;
    height: 40px;
    background: var(--text);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--bg);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}

.pay-btn-full:hover {
    opacity: 0.85;
}

.pay-result {
    margin-top: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    text-align: center;
    display: none;
}

.pay-result.show {
    display: block;
}

.pay-result.success {
    background: rgba(22, 163, 74, 0.1);
    color: var(--success);
}

.pay-result.error {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error);
}

.pay-result a {
    color: inherit;
    font-weight: 600;
}

/* ========== 成功弹窗 ========== */
.success-dialog {
    text-align: center;
}

.success-icon {
    width: 56px;
    height: 56px;
    background: rgba(22, 163, 74, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.success-dialog h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.success-info {
    text-align: left;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.success-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.success-row-label {
    color: var(--text-secondary);
}

.success-row-value {
    color: var(--text);
    font-weight: 500;
}

.success-card {
    padding: 14px;
    background: var(--text);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    text-align: left;
}

.success-card-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.success-card-key {
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: 13px;
    color: #86efac;
    word-break: break-all;
    line-height: 1.6;
}

.success-tip {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .header-inner {
        padding: 0 16px;
    }
    
    .header-center {
        display: none;
    }
    
    .main {
        padding: 24px 16px 60px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .order-form {
        flex-direction: column;
    }
    
    .order-btn {
        width: 100%;
    }
    
    .pay-methods {
        flex-direction: column;
    }
}

/* ========== 响应式适配 ========== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .main {
        padding: 24px 1rem 60px;
    }
    
    .product-card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
