/* === 核心容器 === */
.wp-toolbox-container {
    max-width: 800px; margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333; transition: background-color 0.3s, color 0.3s;
    background: #fff; padding: 30px; border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}
.wp-toolbox-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.wp-toolbox-title { margin: 0; font-size: 22px; font-weight: 700; color: inherit; }

/* === 护眼模式开关 === */
.wp-theme-toggle { background: none; border: 1px solid #eee; border-radius: 20px; padding: 6px 12px; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 13px; color: #888; transition: all 0.2s; }
.wp-theme-toggle:hover { background: #f9f9f9; color: #333; }
.wp-theme-toggle svg { width: 16px; height: 16px; fill: currentColor; }

/* === 文本域 === */
.wp-input-wrapper { position: relative; margin-bottom: 20px; }
.wp-textarea {
    width: 100%; min-height: 220px; padding: 18px;
    border: 1px solid #eee; border-radius: 12px;
    font-family: "Consolas", "Monaco", monospace; font-size: 14px; line-height: 1.8;
    resize: vertical; box-sizing: border-box; transition: all 0.3s;
    outline: none; background: #fafafa; color: #333;
}
.wp-textarea:focus { border-color: #007cba; background: #fff; box-shadow: 0 0 0 4px rgba(0,124,186,0.1); }

/* === 操作栏与胶囊开关 === */
.wp-action-bar { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; flex-wrap: wrap;}
.wp-capsule-switch { display: flex; background: #f0f0f1; border-radius: 20px; padding: 3px; cursor: pointer; user-select: none; transition: all 0.2s; flex: 1;}
.wp-capsule-opt { flex: 1; padding: 8px 10px; border-radius: 18px; font-size: 12px; font-weight: 600; color: #888; transition: all 0.2s; text-align: center; white-space: nowrap;}
.wp-capsule-opt.active { background: #fff; color: #333; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }

/* === 按钮组 === */
.wp-btn-group { display: flex; gap: 10px; }
.wp-btn-primary { padding: 10px 24px; border: none; border-radius: 20px; background: #333; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.wp-btn-primary:hover { background: #007cba; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,124,186,0.3); }
.wp-btn-ghost { padding: 10px 20px; border: 1px solid #eee; border-radius: 20px; background: transparent; color: #666; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.wp-btn-ghost:hover { background: #f9f9f9; color: #333; border-color: #ccc; }
.wp-stats { text-align: right; font-size: 12px; color: #aaa; margin-top: 8px; }

/* === 暗黑模式 === */
.wp-toolbox-container.dark-mode { background: #181818; color: #eee; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.dark-mode .wp-theme-toggle { border-color: #333; color: #888; }
.dark-mode .wp-theme-toggle:hover { background: #222; color: #eee; }
.dark-mode .wp-textarea { background: #222; border-color: #333; color: #eee; }
.dark-mode .wp-textarea:focus { background: #252525; border-color: #007cba; box-shadow: 0 0 0 4px rgba(0,124,186,0.2); }
.dark-mode .wp-capsule-switch { background: #2a2a2a; }
.dark-mode .wp-capsule-opt { color: #888; }
.dark-mode .wp-capsule-opt.active { background: #333; color: #fff; box-shadow: none; }
.dark-mode .wp-btn-primary { background: #eee; color: #111; }
.dark-mode .wp-btn-primary:hover { background: #007cba; color: #fff; }
.dark-mode .wp-btn-ghost { border-color: #333; color: #aaa; }
.dark-mode .wp-btn-ghost:hover { background: #222; color: #fff; }
.dark-mode .wp-stats { color: #666; }

/* === 📱 移动端适配 === */
@media (max-width: 600px) {
    .wp-toolbox-container { margin: 15px; padding: 20px; border-radius: 12px; }
    .wp-toolbox-title { font-size: 18px; }
    .wp-textarea { min-height: 180px; padding: 15px; font-size: 16px; }
    .wp-action-bar { flex-direction: column; align-items: stretch; gap: 12px; }
    .wp-capsule-switch { width: 100%; }
    .wp-capsule-opt { padding: 10px 0; font-size: 13px; }
    .wp-btn-group { width: 100%; }
    .wp-btn-primary, .wp-btn-ghost { flex: 1; text-align: center; padding: 12px 0; font-size: 15px; }
}
