/* -----------------------------------------------------------
   CSS 变量定义：一处修改，全站同步
   建议：新增颜色变量时，统一在此处添加，保持颜色系统一致性
   ----------------------------------------------------------- */
:root {
    /* 基础颜色 */
    --bg-color: #f5f8fc;
    --card-bg: #ffffff;
    --text-main: #0f2347;
    --text-sec: #627799;
    --text-light: #8a9baa;
    
    /* 强调色系统 */
    --accent: #2f73f7;
    --accent-rgb: 47, 115, 247;
    --accent-dark: #1d4ed8;
    --accent-darker: #1e40af;
    
    /* 功能色系统 */
    --success: #52c41a;
    --success-rgb: 82, 196, 26;
    --success-dark: #43a047;
    --success-darker: #388e3c;
    
    --error: #ff4d4f;
    --error-rgb: 255, 77, 79;
    --error-dark: #e53935;
    --error-darker: #c62828;
    
    --warning: #faad14;
    --warning-rgb: 250, 173, 20;
    --warning-dark: #f59c00;
    --warning-darker: #ef6c00;
    
    --info: #1890ff;
    --info-rgb: 24, 144, 255;
    --info-dark: #096dd9;
    --info-darker: #0050b3;
    
    /* 边框和阴影 */
    --border: #d8e3f2;
    --border-light: #e6edf5;
    --border-dark: #b9c7d6;
    --shadow-sm: 0 2px 8px rgba(var(--accent-rgb), 0.1);
    --shadow: 0 4px 12px rgba(var(--accent-rgb), 0.15);
    --shadow-lg: 0 8px 24px rgba(var(--accent-rgb), 0.2);
    
    /* 组件专用颜色 */
    --input-bg: #f7fbff;
    --input-border: #c8d9f2;
    --input-text: #16305f;
    --input-placeholder: #90a4ae;
    
    /* 渐变颜色 */
    --header-bg-start: #f8fafc;
    --header-bg-end: #e0f2fe;
    --card-gradient-start: #ffffff;
    --card-gradient-end: #f8fafc;
    --card-hover-gradient-end: #eff6ff;
    
    /* Toast 颜色 */
    --toast-success-start: var(--success);
    --toast-success-end: var(--success-dark);
    --toast-error-start: var(--error);
    --toast-error-end: var(--error-dark);
    --toast-warning-start: var(--warning);
    --toast-warning-end: var(--warning-dark);
    --toast-info-start: var(--info);
    --toast-info-end: var(--info-dark);
}

/* -----------------------------------------------------------
   基础样式
   ----------------------------------------------------------- */
body {
    margin: 0;
    padding: 0;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px 20px;
}

.layout-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
}

.sidebar {
    display: flex;
    flex-direction: column;
}

.sidebar-left { order: 1; }
.main-content {
    order: 2;
    min-width: 0; /* 防止内容溢出 */
}
.sidebar-right { order: 3; }

.ad-bottom { margin-top: 40px; width: 100%; }
.ad-sidebar { min-height: 300px; margin-bottom: 20px; }
.ad-full-width { min-height: 120px; width: 100%; }

/* 广告位样式优化 */
.ad-box > div { transition: opacity 0.2s ease; }
.ad-box:hover > div { opacity: 0.8; }

/* -----------------------------------------------------------
   表单元素统一样式
   ----------------------------------------------------------- */
input, select, textarea {
    font-family: inherit;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.15);
}

button {
    cursor: pointer;
    border-radius: 10px;
}

/* -----------------------------------------------------------
   统一按钮样式
   ----------------------------------------------------------- */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-darker) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: var(--card-hover-gradient-end);
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(var(--accent-rgb), 0.1);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-start) 0%, var(--success-end) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(82, 196, 26, 0.2);
}

.btn-success:hover {
    background: linear-gradient(135deg, #43a047 0%, #388e3c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}

/* 计算按钮样式 - 与主要按钮保持一致 */
.btn-calc {
    padding: 14px;
    width: 100%;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
}

.btn-calc:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-darker) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
}

.btn-calc:disabled {
    background: #a0a0a0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 下载按钮样式 - 与主要按钮保持一致 */
.download-btn {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: bold;
    margin-right: 10px;
    margin-bottom: 10px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.2);
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.download-btn:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-darker) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.3);
    text-decoration: none;
}

/* -----------------------------------------------------------
   工具页面通用样式
   建议：工具页面优先使用这些类名，保持样式统一
   ----------------------------------------------------------- */

/* 工具容器 */
.tool-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.tool-container h2 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 700;
}

.tool-container h3 {
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 12px;
}

/* 输入组 */
.input-group {
    margin-bottom: 18px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
}

.input-group input:not([type="file"]),
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--input-text);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:not([type="file"]):focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.1);
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: var(--input-placeholder);
}

/* 文件上传 */
.input-group input[type="file"] {
    display: block;
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    background: var(--input-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: var(--text-sec);
}

.input-group input[type="file"]:hover {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), 0.05);
}

.input-group input[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 12px;
    transition: background 0.2s ease;
}

.input-group input[type="file"]::-webkit-file-upload-button:hover {
    background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-darker) 100%);
}

/* 结果框 */
.result-box {
    margin-top: 24px;
    padding: 20px;
    background: var(--card-gradient-start);
    border-radius: 10px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

/* 卡片布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.card-item {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.card-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

/* 分隔线 */
.divider {
    height: 1px;
    background: var(--border-light);
    margin: 20px 0;
    border: none;
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 50%;
    border-top-color: var(--accent);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* -----------------------------------------------------------
   组件样式
   ----------------------------------------------------------- */
.icon-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f0ff;
    border: 1px solid #d0e2ff;
    color: #2154a1;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-badge:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* -----------------------------------------------------------
   统一头部样式
   ----------------------------------------------------------- */
header {
    padding: 20px 0;
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 20px 30px;
    background: linear-gradient(135deg, var(--header-bg-start) 0%, var(--header-bg-end) 100%);
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.1);
    position: relative;
    overflow: hidden;
}

.header-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(var(--accent-rgb), 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.header-info {
    flex: 1;
    min-width: 250px;
    text-align: left;
    position: relative;
    z-index: 1;
}

.header-title {
    font-size: 2.4rem;
    margin: 0 0 8px 0;
    color: var(--accent);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.header-title a:hover { color: var(--accent); }

.header-subtitle {
    margin: 0 0 20px 0;
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
    line-height: 1.5;
    opacity: 0.9;
}

.header-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    position: relative;
    z-index: 1;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1.5px solid rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.3);
}

.nav-link:hover::before { left: 100%; }

.nav-link.active {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-darker) 100%);
    color: #ffffff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.25);
}

/* 许愿池导航链接特殊样式 */
.nav-link-wish {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #8b4513;
    border-color: #ffd700;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.nav-link-wish::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.nav-link-wish:hover {
    background: linear-gradient(135deg, #ffc107 0%, #ffd700 100%);
    color: #8b4513;
    border-color: #ffc107;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.3);
}

.nav-link-wish:hover::before { left: 100%; }

.header-qrcode {
    text-align: center;
    margin-left: 20px;
}

.qrcode-container {
    width: 100px;
    height: 100px;
    background-color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.qrcode-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qrcode-text {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #214a85;
    font-weight: 600;
}

/* -----------------------------------------------------------
   导航组件样式
   ----------------------------------------------------------- */
nav { 
    display: flex; 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 10px; 
    margin-bottom: 20px; 
}

nav a {
    padding: 10px 18px;
    background: #eff4ff;
    color: var(--text-main);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    transition: all 0.2s ease-out;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

nav a::before {
    content: "⟩";
    font-size: 0.8rem;
    color: #8da4d2;
    transform: translateY(1px);
}

nav a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* -----------------------------------------------------------
   工具卡片与容器
   ----------------------------------------------------------- */
.tool-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--border);
    min-height: 300px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.tool-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 28px rgba(var(--accent-rgb), 0.18);
}

h2, h3 { color: #214a85; }

h2 {
    border-left: 4px solid var(--accent);
    padding-left: 10px;
    font-weight: 700;
    margin-top: 10px;
}

h3 {
    position: relative;
    padding-left: 22px;
}

h3::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent);
}

/* 首页工具列表展示 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px 16px;
    margin-top: 20px;
    align-items: stretch;
}

.card {
    background: var(--card-bg);
    padding: 18px;
    border-radius: 14px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    background: linear-gradient(180deg, var(--card-gradient-start) 0%, var(--card-gradient-end) 100%);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    border-color: #b3c6ff;
    box-shadow: 0 12px 24px rgba(var(--accent-rgb), 0.12);
    background: linear-gradient(180deg, var(--card-gradient-start) 0%, var(--card-hover-gradient-end) 100%);
}

.card:hover::before { opacity: 1; }

.card h3 {
    margin: 0 0 8px 0;
    color: var(--text-main);
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.2px;
}

.card h3::before { content: none; }
.card h3 span {
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.9;
}

.card p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-sec);
    line-height: 1.5;
    flex-grow: 1;
    display: flex;
    align-items: flex-start;
    padding-right: 4px;
}

/* 分类标题样式 */
.tool-category {
    margin-bottom: 32px;
    margin-top: 32px;
    padding: 24px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.tool-category:first-of-type { margin-top: 20px; }

.category-title {
    font-size: 1.3rem;
    color: var(--text-main);
    margin: 0 0 16px 0;
    padding-bottom: 0;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent) 0%, #6293ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.category-title::before { content: none; }

/* -----------------------------------------------------------
   许愿池样式
   ----------------------------------------------------------- */
.wish-pool {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.wish-input-section, .wish-list-section {
    flex: 1;
    min-width: 300px;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    background: linear-gradient(180deg, var(--card-gradient-start) 0%, var(--card-gradient-end) 100%);
}

.wish-input-section h4, .wish-list-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 700;
}

.form-group { margin-bottom: 20px; }

.form-group textarea {
    width: 100%;
    resize: vertical;
    padding: 12px 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
}

.wish-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wish-item {
    padding: 15px;
    background: var(--input-bg);
    border: 1px solid #e0e8f9;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.wish-item:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.1);
}

.wish-content {
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.6;
}

.wish-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #64748b;
}

.wish-name {
    font-weight: 600;
    color: var(--accent);
}

/* -----------------------------------------------------------
   页脚样式
   ----------------------------------------------------------- */
footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-sec);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

/* -----------------------------------------------------------
   Toast Notification Styles
   ----------------------------------------------------------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 350px;
    word-wrap: break-word;
    pointer-events: auto;
    cursor: default;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success { background: linear-gradient(135deg, var(--success-start) 0%, var(--success-end) 100%); }
.toast.error { background: linear-gradient(135deg, var(--error-start) 0%, var(--error-end) 100%); }
.toast.warning { background: linear-gradient(135deg, var(--warning-start) 0%, var(--warning-end) 100%); }
.toast.info { background: linear-gradient(135deg, var(--info-start) 0%, var(--info-end) 100%); }

/* Toast buttons for confirm dialogs */
.toast-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-end;
}

.toast-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.toast-btn.primary {
    background: white;
    color: var(--info-start);
}

.toast-btn.primary:hover { background: #f0f0f0; }

.toast-btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.toast-btn.secondary:hover { background: rgba(255, 255, 255, 0.3); }

/* -----------------------------------------------------------
   移动端响应式优化
   ----------------------------------------------------------- */
@media (max-width: 768px) {
    .container { padding: 10px; }
    .layout-wrapper {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .sidebar { display: none; } /* 移动端隐藏侧边栏广告 */
    .ad-bottom { margin-top: 20px; }
    .ad-full-width { min-height: 100px; }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
        border-radius: 16px;
    }
    .header-info {
        text-align: center;
        margin-bottom: 25px;
    }
    .header-qrcode { margin-left: 0; }
    .header-title { font-size: 2.2rem; }
    .header-subtitle {
        font-size: 1rem;
        margin-bottom: 25px;
    }
    .header-nav {
        justify-content: center;
        gap: 12px;
    }
    .nav-link {
        padding: 10px 16px;
        font-size: 0.85rem;
        border-radius: 20px;
    }
}

@media (max-width: 600px) {
    header { padding: 40px 0 20px; }
    header h1 { font-size: 1.8rem; }
    .tool-container { padding: 20px; }
}