/* public/assets/css/social/twitter-maker.css */

.tw-wrapper { padding: 32px 16px; position: relative; }
.tw-header { text-align: center; margin-bottom: 32px; }
.tw-title { font-size: 2.2rem; font-weight: 800; color: var(--text-main); margin-bottom: 12px; }
.tw-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; line-height: 1.6; }

/* 🌟 核心布局调整：上下排版 */
.tw-workspace { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; align-items: center; }

/* ==========================================
   第一排：像素级推文还原预览区
   ========================================== */
.tw-preview-wrapper { width: 100%; box-sizing: border-box; display: flex; justify-content: center; background: url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="%23cbd5e1"/></svg>') repeat; background-color: #f1f5f9; border-radius: 16px; padding: 40px 20px; border: 1px solid var(--border-color); overflow-x: hidden; }
[data-theme="dark"] .tw-preview-wrapper { background-color: #0f172a; background-image: url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" fill="%23334155"/></svg>'); }

/* 截图容器：强制固定宽度，保证字体不换行形变 */
.tw-capture-area { width: 560px; min-width: 560px; border-radius: 16px; padding: 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; box-sizing: border-box; border: 1px solid; transform-origin: top center; }

/* 🌟 主题色彩系统 (完全复刻 X 官方数值) */
.theme-light { background-color: #ffffff; color: #0f1419; border-color: #eff3f4; }
.theme-light .t-handle, .theme-light .t-time-row, .theme-light .t-stat { color: #536471; }

.theme-dim { background-color: #15202b; color: #f7f9f9; border-color: #38444d; }
.theme-dim .t-handle, .theme-dim .t-time-row, .theme-dim .t-stat { color: #8b98a5; }

.theme-dark { background-color: #000000; color: #e7e9ea; border-color: #2f3336; }
.theme-dark .t-handle, .theme-dark .t-time-row, .theme-dark .t-stat { color: #71767b; }

/* 细节排版 */
.tweet-container { display: flex; flex-direction: column; width: 100%; }
.t-header { display: flex; align-items: center; margin-bottom: 12px; }
.t-avatar { width: 48px; height: 48px; border-radius: 50%; overflow: hidden; margin-right: 12px; flex-shrink: 0; background: #e2e8f0; }
.t-avatar img { width: 100%; height: 100%; object-fit: cover; }
.t-user-info { flex: 1; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.t-name-row { display: flex; align-items: center; gap: 4px; }
.t-name { font-weight: 700; font-size: 15px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-badge { display: flex; align-items: center; }
.t-handle { font-size: 15px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-menu { padding: 8px; border-radius: 50%; color: inherit; opacity: 0.6; display: flex; align-items: center; }

.t-body { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.t-content { font-size: 17px; line-height: 24px; word-wrap: break-word; white-space: pre-wrap; }
.t-link { color: #1d9bf0; } 
.t-media { border-radius: 16px; overflow: hidden; border: 1px solid; border-color: inherit; }
.t-media img { width: 100%; display: block; object-fit: cover; max-height: 500px; }

.t-time-row { display: flex; align-items: center; gap: 4px; font-size: 15px; padding-bottom: 16px; border-bottom: 1px solid; border-color: inherit; }
.t-views b { color: inherit; font-weight: 700; }

.t-metrics-row { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; }
.t-stat { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.t-stat svg { opacity: 0.8; }

/* ==========================================
   第二排：极客控制面板 (网格排列)
   ========================================== */
.tw-controls { width: 100%; box-sizing: border-box; background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 16px; padding: 24px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }

.control-section { display: flex; flex-direction: column; }
.control-section h4 { margin: 0 0 16px 0; font-size: 1rem; color: var(--text-main); border-bottom: 2px solid rgba(29, 155, 240, 0.2); padding-bottom: 8px; display: inline-block; width: fit-content; }

.input-group { margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.input-group label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.input-group input[type="text"], .input-group select, .input-group textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-body); color: var(--text-main); font-size: 0.95rem; outline: none; transition: 0.2s; box-sizing: border-box; }
.input-group input[type="text"]:focus, .input-group select:focus, .input-group textarea:focus { border-color: #1d9bf0; }
.input-group input[type="file"] { font-size: 0.85rem; color: var(--text-muted); padding-top: 4px; }
.input-group textarea { resize: vertical; font-family: inherit; }

.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn-text-sm { background: none; border: none; color: #ef4444; font-size: 0.8rem; cursor: pointer; text-align: left; padding: 0; font-weight: 600; }
.btn-text-sm:hover { text-decoration: underline; }

.tw-btn-primary { background: #1d9bf0; color: #fff; border: none; padding: 14px 20px; font-size: 1.05rem; font-weight: 800; border-radius: 30px; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 10px rgba(29, 155, 240, 0.3); }
.tw-btn-primary:hover { background: #1a8cd8; transform: translateY(-2px); }

.tw-info-card { background: var(--bg-surface); padding: 24px; border-radius: 16px; border: 1px solid var(--border-color); box-sizing: border-box; max-width: 900px; margin: 0 auto; }

/* 📱 响应式适配 */
@media (max-width: 768px) {
    /* 在平板及手机端，控制面板回退为单列纵向排列 */
    .tw-controls { grid-template-columns: 1fr; gap: 24px; }
    .tw-preview-wrapper { padding: 20px 10px; }
}