/**
 * 工具独立页面样式
 * 适配深色/浅色主题，复用项目 CSS 变量
 */

/* ==================== 页面容器 ==================== */
.tool-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.tool-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: nowrap;
}

.tool-header-left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1;
}

.tool-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tool-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1;
}

.tool-action-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-1px);
}

.tool-action-btn:active {
    transform: scale(0.95);
}

.tool-action-btn i {
    font-size: 0.9rem;
}

.tool-share-btn {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: var(--accent);
}

.tool-share-btn:hover {
    background: var(--accent);
    color: white;
}

.tool-back-btn {
    background: rgba(255, 255, 255, 0.05);
}

.tool-page-title {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-page-title i {
    color: var(--accent);
}

.tool-page-body {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

/* ==================== 通用表单元素 ==================== */
.tool-page-body textarea,
.tool-page-body input[type="text"],
.tool-page-body input[type="number"],
.tool-page-body input[type="password"],
.tool-page-body input[type="email"],
.tool-page-body input[type="search"],
.tool-page-body input[type="date"],
.tool-page-body input[type="datetime-local"],
.tool-page-body input[type="time"],
.tool-page-body input[type="url"],
.tool-page-body select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    box-sizing: border-box;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.tool-page-body textarea:focus,
.tool-page-body input:focus,
.tool-page-body select:focus {
    border-color: var(--accent);
}

.tool-page-body textarea {
    resize: vertical;
    min-height: 80px;
    font-family: 'SF Mono', Monaco, monospace;
}

.tool-page-body label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.tool-page-body input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.tool-page-body input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.tool-page-body input[type="color"] {
    width: 100%;
    height: 50px;
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
}

.tool-page-body code {
    font-family: 'SF Mono', Monaco, monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.tool-page-body img {
    max-width: 100%;
    border-radius: 8px;
}

/* 深色主题下日期/时间输入框 */
.tool-page-body input[type="date"],
.tool-page-body input[type="datetime-local"],
.tool-page-body input[type="time"] {
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    -webkit-appearance: none;
    appearance: none;
}

.tool-page-body input[type="date"]::-webkit-calendar-picker-indicator,
.tool-page-body input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.tool-page-body input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

[data-theme="light"] .tool-page-body input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="light"] .tool-page-body input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="light"] .tool-page-body input[type="time"]::-webkit-calendar-picker-indicator {
    filter: none;
}

/* ==================== 通用布局 ==================== */
.tool-section {
    margin-bottom: 1.5rem;
}

.tool-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tool-row > label {
    min-width: 80px;
    margin-bottom: 0;
    white-space: nowrap;
}

.tool-row > input,
.tool-row > select {
    flex: 1;
}

.tool-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tool-result {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
}

.tool-result-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid var(--border);
}

/* ==================== Tab 切换 ==================== */
.tool-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tool-tab-btn {
    flex: 1;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    text-align: center;
    font-size: 0.9rem;
}

.tool-tab-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

.tool-tab-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.tool-tab-content {
    display: none;
}

.tool-tab-content.active {
    display: block;
}

/* ==================== 上传区域 ==================== */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    margin-bottom: 1rem;
}

.upload-area:hover {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.05);
}

.upload-area i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.upload-area p {
    color: var(--text-secondary);
}

/* ==================== 结果网格 ==================== */
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.result-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.result-item span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.result-item code,
.result-item strong {
    color: var(--accent);
    font-family: 'SF Mono', Monaco, monospace;
}

/* ==================== 预览区域 ==================== */
.preview-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 60px;
    overflow-x: auto;
}

/* ==================== 信息提示 ==================== */
.info-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-text code {
    color: var(--accent);
}

.error-text {
    color: #ef4444;
    text-align: center;
    padding: 1rem;
}

.success-text {
    color: #22c55e;
    text-align: center;
    padding: 1rem;
}

/* ==================== 全屏覆盖 ==================== */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-overlay-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 0.85rem;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0.7;
}

/* ==================== 海报分享弹窗 ==================== */
.poster-modal-content {
    max-width: 400px;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
    margin: 0.5rem;
}

.poster-modal-body {
    padding: 0;
}

.poster-preview-wrapper {
    padding: 0;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    max-height: calc(90vh - 150px);
}

.poster-canvas {
    width: 100%;
    max-width: 320px;
    background: transparent;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* 海报卡片 - 深色模式层次感设计 */
.poster-card {
    background: #242442;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    position: relative;
    /* 注意：不要在卡片上加 box-shadow，html2canvas 会渲染出黑边 */
}

/* 最终海报图片 */
.poster-final-img {
    width: 100%;
    display: block;
    border-radius: 20px;
    /* 外层容器添加阴影，图片本身不带阴影 */
}

/* 海报加载状态 */
.poster-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

.poster-loading i {
    font-size: 1.5rem;
    color: #818cf8;
}

/* 海报头部 - 深色背景区分 */
.poster-header {
    padding: 0.875rem 1.25rem;
    background: #2a2a4a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.poster-site-logo {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.poster-tool-badge {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a5b4fc;
}

.poster-tool-badge i {
    font-size: 0.7rem;
}

/* 海报主体内容区 */
.poster-body {
    padding: 1.25rem;
    min-height: 160px;
    background: #1e1e3a;
}

/* ===== 海报底部 - 深色背景区分 ===== */
.poster-footer {
    padding: 1.25rem;
    background: #2a2a4a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.poster-footer-info {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
}

.poster-site-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #e2e8f0;
    letter-spacing: 0.01em;
}

.poster-slogan {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.05em;
}

.poster-qr-text {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.55);
    margin-top: 0.4rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

/* ===== 天气海报样式 ===== */
.poster-weather-main {
    text-align: center;
    padding: 0.5rem 0 1rem;
}

.poster-weather-icon {
    font-size: 4.5rem;
    margin-bottom: 0.75rem;
    line-height: 1;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.poster-weather-temp {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.poster-weather-desc {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.poster-weather-city {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.35rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.poster-weather-city::before {
    content: '\f3c5';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    color: #ef4444;
}

.poster-weather-date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

.poster-weather-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-top: 1rem;
}

.poster-detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.poster-detail-item i {
    color: #6366f1;
    font-size: 0.8rem;
    width: 16px;
    text-align: center;
}

/* ===== 日历海报样式 ===== */
.poster-calendar-main {
    text-align: center;
    padding: 0.25rem 0 0.75rem;
}

.poster-calendar-day {
    font-size: 5.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.poster-calendar-date {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.poster-calendar-lunar {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.poster-calendar-ganzhi {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.15rem;
}

.poster-calendar-animal {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.15rem;
}

.poster-calendar-chongsha {
    font-size: 0.75rem;
    color: rgba(248, 113, 113, 0.8);
    margin-bottom: 0.3rem;
}

.poster-calendar-yiji {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.poster-yi, .poster-ji {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    text-align: left;
    line-height: 1.5;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.poster-label {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.08em;
    align-self: flex-start;
}

.poster-label-yi {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.poster-label-ji {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* ===== 默认海报样式 ===== */
.poster-default {
    text-align: center;
    padding: 2rem 0;
}

.poster-default-icon {
    font-size: 4rem;
    color: #6366f1;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 6px 16px rgba(99, 102, 241, 0.25));
}

.poster-default-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}

.poster-default-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    max-width: 220px;
    margin: 0 auto;
}

/* ===== 海报底部 - 精致二维码区 ===== */
.poster-footer {
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.poster-qr-wrapper {
    flex-shrink: 0;
    text-align: center;
}

.poster-qr-img {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    background: #fff;
    padding: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    display: block;
}

.poster-qr-text {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.4rem;
    font-weight: 500;
    letter-spacing: 0.05em;
}

.poster-footer-info {
    flex: 1;
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
}

.poster-site-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.01em;
}

.poster-slogan {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.05em;
}

/* ===== 海报操作按钮 ===== */
.poster-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
}

.poster-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poster-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.poster-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.poster-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.poster-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ===== 语录类海报样式 ===== */
.poster-quote-main {
    text-align: center;
    padding: 0.25rem 0;
}

.poster-quote-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.poster-quote-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.poster-quote-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    padding: 0 0.5rem;
    max-height: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
}

.poster-quote-mark {
    font-size: 3rem;
    color: rgba(99, 102, 241, 0.3);
    line-height: 1;
    margin-top: 0.5rem;
    font-family: Georgia, serif;
}

.poster-quote-sub {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 0.75rem;
    letter-spacing: 0.05em;
}

.poster-quote-content.poster-miaolang {
    font-size: 1.2rem;
    color: #fbbf24;
}

.poster-quote-content.poster-juhua {
    font-size: 1.1rem;
    letter-spacing: 0.05em;
}

/* 答案之书海报 */
.poster-answer-main {
    text-align: center;
    padding: 0.5rem 0;
}

.poster-answer-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.poster-answer-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.poster-answer-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.poster-answer-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* 藏头诗海报 */
.poster-poem-main {
    text-align: center;
    padding: 0.25rem 0;
}

.poster-poem-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.poster-poem-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.poster-poem-lines {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.poster-poem-line {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    padding: 0.4rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border-left: 3px solid rgba(99, 102, 241, 0.5);
}

/* 运势/占卜海报 */
.poster-fortune-main {
    text-align: center;
    padding: 0.5rem 0;
}

.poster-fortune-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.poster-fortune-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.poster-fortune-result {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: 0.1em;
}

.poster-fortune-detail {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    padding: 0 0.5rem;
}

/* ===== 计数器类海报样式 ===== */
.poster-counter-main {
    text-align: center;
    padding: 0.5rem 0;
}

.poster-counter-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.poster-counter-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.poster-counter-num {
    font-size: 4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.poster-counter-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    font-family: 'SF Mono', Monaco, monospace;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.poster-counter-unit {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.poster-counter-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== 转盘类海报样式 ===== */
.poster-wheel-main {
    text-align: center;
    padding: 0.5rem 0;
}

.poster-wheel-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.poster-wheel-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.poster-wheel-result {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.75rem;
    letter-spacing: 0.1em;
}

.poster-wheel-hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== Tab工具海报样式 ===== */
.poster-tab-main {
    text-align: center;
    padding: 0.5rem 0;
}

.poster-tab-icon {
    font-size: 2.5rem;
    color: #818cf8;
    margin-bottom: 0.75rem;
}

.poster-tab-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
}

.poster-tab-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
}

.poster-tab-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.poster-tab-feature {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* 最终海报图片（可长按保存） */
.poster-final-img {
    width: 100%;
    display: block;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ==================== 浅色模式适配 ==================== */
[data-theme="light"] .poster-card {
    background: #fafafa;
}

[data-theme="light"] .poster-header {
    background: #f0f0f5;
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .poster-site-logo {
    color: rgba(0, 0, 0, 0.45);
}

[data-theme="light"] .poster-tool-badge {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

[data-theme="light"] .poster-body {
    background: linear-gradient(180deg, #f8f7ff 0%, #f5f5fa 100%);
}

[data-theme="light"] .poster-footer {
    background: #f0f0f5;
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .poster-weather-temp {
    color: #1e1b4b;
    -webkit-text-fill-color: #1e1b4b;
}

[data-theme="light"] .poster-weather-desc,
[data-theme="light"] .poster-weather-city {
    color: rgba(30, 27, 75, 0.75);
}

[data-theme="light"] .poster-weather-date {
    color: rgba(30, 27, 75, 0.45);
}

[data-theme="light"] .poster-weather-detail {
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .poster-detail-item {
    color: rgba(30, 27, 75, 0.65);
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .poster-detail-item i {
    color: #6366f1;
}

[data-theme="light"] .poster-calendar-day {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .poster-calendar-date {
    color: rgba(30, 27, 75, 0.75);
}

[data-theme="light"] .poster-calendar-lunar {
    color: #b45309;
}

[data-theme="light"] .poster-calendar-ganzhi,
[data-theme="light"] .poster-calendar-animal {
    color: rgba(30, 27, 75, 0.55);
}

[data-theme="light"] .poster-calendar-chongsha {
    color: rgba(239, 68, 68, 0.85);
}

[data-theme="light"] .poster-calendar-yiji {
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .poster-yi,
[data-theme="light"] .poster-ji {
    color: rgba(30, 27, 75, 0.75);
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .poster-default-title {
    color: #1e1b4b;
}

[data-theme="light"] .poster-default-desc {
    color: rgba(30, 27, 75, 0.55);
}

[data-theme="light"] .poster-default-icon {
    color: #6366f1;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.15));
}

[data-theme="light"] .poster-footer {
    background: rgba(0, 0, 0, 0.02);
    border-top-color: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .poster-site-name {
    color: #1e1b4b;
}

[data-theme="light"] .poster-slogan,
[data-theme="light"] .poster-qr-text {
    color: rgba(30, 27, 75, 0.45);
}

[data-theme="light"] .poster-quote-title,
[data-theme="light"] .poster-answer-label,
[data-theme="light"] .poster-poem-title,
[data-theme="light"] .poster-fortune-label,
[data-theme="light"] .poster-counter-label,
[data-theme="light"] .poster-wheel-label {
    color: rgba(30, 27, 75, 0.5);
}

[data-theme="light"] .poster-quote-content {
    color: rgba(30, 27, 75, 0.85);
}

[data-theme="light"] .poster-quote-mark {
    color: rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .poster-quote-sub {
    color: rgba(30, 27, 75, 0.45);
}

[data-theme="light"] .poster-answer-text {
    color: #1e1b4b;
    background: rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .poster-answer-hint {
    color: rgba(30, 27, 75, 0.4);
}

[data-theme="light"] .poster-poem-line {
    color: rgba(30, 27, 75, 0.8);
    background: rgba(0, 0, 0, 0.03);
    border-left-color: rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .poster-fortune-result {
    color: #6366f1;
}

[data-theme="light"] .poster-fortune-detail {
    color: rgba(30, 27, 75, 0.6);
}

[data-theme="light"] .poster-counter-num,
[data-theme="light"] .poster-counter-time {
    color: #1e1b4b;
}

[data-theme="light"] .poster-counter-unit {
    color: rgba(30, 27, 75, 0.6);
}

[data-theme="light"] .poster-counter-hint,
[data-theme="light"] .poster-wheel-hint {
    color: rgba(30, 27, 75, 0.4);
}

[data-theme="light"] .poster-wheel-result {
    color: #d97706;
}

[data-theme="light"] .poster-tab-icon {
    color: #6366f1;
}

[data-theme="light"] .poster-tab-title {
    color: #1e1b4b;
}

[data-theme="light"] .poster-tab-subtitle {
    color: rgba(30, 27, 75, 0.5);
}

[data-theme="light"] .poster-tab-feature {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.15);
    color: rgba(30, 27, 75, 0.7);
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .tool-page {
        padding: 0;
    }

    .tool-page-header {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .tool-page-body {
        padding: 1rem;
    }

    .result-grid,
    .result-grid-3 {
        grid-template-columns: 1fr;
    }

    .tool-row {
        flex-direction: column;
        align-items: stretch;
    }

    .tool-row > label {
        min-width: 0;
    }

    .poster-modal-content {
        max-width: 100%;
        margin: 0.75rem;
        border-radius: 16px;
    }

    .poster-preview-wrapper {
        padding: 0.875rem;
    }

    .poster-card {
        border-radius: 16px;
    }

    .poster-header,
    .poster-footer {
        padding: 0.875rem 1rem;
    }

    .poster-body {
        padding: 1rem;
    }

    .poster-weather-temp {
        font-size: 3rem;
    }

    .poster-weather-icon {
        font-size: 3.5rem;
    }

    .poster-calendar-day {
        font-size: 4rem;
    }

    .poster-default-icon {
        font-size: 3rem;
    }

    .poster-default-title {
        font-size: 1.5rem;
    }

    .poster-actions {
        padding: 0.875rem 1rem;
    }

    .poster-qr-img {
        width: 72px;
        height: 72px;
    }

    .poster-site-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .tool-action-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        gap: 0.3rem;
    }

    .tool-action-btn .btn-text {
        display: none;
    }

    .tool-page-title {
        font-size: 1.05rem;
    }

    .tool-header-actions {
        gap: 0.35rem;
    }

    .poster-qr-img {
        width: 64px;
        height: 64px;
    }

    .poster-site-name {
        font-size: 0.9rem;
    }
}