/* ========================================
   CSS Box Shadow 生成工具样式
   ======================================== */

.main-content { width: 100%; max-width: 1200px; height: calc(100vh - 120px); display: flex; align-items: center; padding: 0 20px; padding-bottom: 50px; z-index: 10; }
.container { width: 100%; height: 100%; }
.tool-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-xl); overflow: hidden; display: flex; width: 100%; height: 100%; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }

/* 左侧控制面板 */
.controls-section { flex: 0 0 320px; padding: 20px; overflow-y: auto; border-right: 1px solid var(--border-color); }
.control-group { margin-bottom: 18px; }
.control-label { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.control-value { color: var(--primary-color); font-family: var(--font-mono); font-size: 12px; }
.slider { width: 100%; height: 4px; -webkit-appearance: none; appearance: none; background: rgba(255,255,255,0.1); border-radius: 2px; outline: none; cursor: pointer; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--primary-color); cursor: pointer; border: 2px solid var(--bg-card); box-shadow: 0 0 4px rgba(200,117,51,0.5); }
.color-row { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.color-input { width: 40px; height: 30px; border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; background: none; padding: 0; }
.opacity-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-secondary); }
.toggle-option { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-secondary); font-size: 13px; user-select: none; }
.toggle-option input { accent-color: var(--primary-color); }

/* 预设 */
.presets-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.preset-label { font-size: 12px; color: var(--text-muted); font-weight: 600; margin-bottom: 10px; display: block; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preset-item { background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); border-radius: 8px; padding: 8px; cursor: pointer; transition: 0.2s; text-align: center; }
.preset-item:hover { border-color: var(--primary-color); background: var(--primary-light); }
.preset-name { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.preset-preview { width: 100%; height: 30px; background: var(--bg-card); border-radius: 6px; }

/* 右侧预览+代码 */
.preview-section { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.preview-area { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.preview-box { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 40px; }
.shadow-preview { width: 200px; height: 200px; background: var(--bg-card); border-radius: 16px; transition: box-shadow 0.15s; }

/* 代码输出 */
.code-output { border-top: 1px solid var(--border-color); }
.code-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border-color); font-size: 12px; color: var(--text-muted); }
.btn-copy-code { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 12px; padding: 4px 8px; border-radius: 4px; transition: 0.2s; }
.btn-copy-code:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.code-text { padding: 14px 16px; margin: 0; font-family: var(--font-mono); font-size: 13px; color: #4ade80; white-space: pre-wrap; word-break: break-all; line-height: 1.6; }

@media (max-width: 768px) {
    .tool-card { flex-direction: column; }
    .controls-section { flex: none; max-height: 50vh; border-right: none; border-bottom: 1px solid var(--border-color); }
    .preview-area { min-height: 250px; }
    .shadow-preview { width: 140px; height: 140px; }
}
