/* ==========================================================================
   🎭 隐姓埋名解忧铺 · 专属样式
   文件：css/anonymous.css
   ========================================================================== */

/* ===== 页面头部 & Logo ===== */
.anonymous-container { max-width: 700px; margin: 0 auto; padding: 20px; }

.page-header { text-align: center; margin: 30px 0 20px 0; }
.page-logo { max-width: 180px; height: auto; margin-bottom: 15px; display: inline-block; }
.page-header h1 { font-size: 1.8rem; font-weight: bold; color: var(--text-primary); margin-bottom: 8px; }
.page-header h1 .highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #b224ef 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.page-header .subhead { font-size: 1rem; color: var(--text-secondary); }

/* ===== 底部导航 ===== */
.bottom-nav {
    display: flex; justify-content: center; gap: 30px; flex-wrap: wrap;
    margin-top: 50px; padding: 20px 0; border-top: 1px dashed var(--border-glass);
}
.bottom-nav a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; font-weight: 600;
    display: flex; align-items: center; gap: 6px; transition: all 0.3s ease; padding: 8px 16px; border-radius: 8px;
}
.bottom-nav a:hover { color: #764ba2; background: rgba(118, 75, 162, 0.08); }
.bottom-nav a i { font-size: 1.1rem; }

/* ===== 树洞投递卡片 ===== */
.mask-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 24px; border: 1px solid rgba(118, 75, 162, 0.25);
    box-shadow: 0 15px 35px rgba(0,0,0,0.06);
    padding: 35px 30px; text-align: center; position: relative; overflow: hidden;
}
[data-theme="dark"] .mask-card { background: rgba(45, 42, 36, 0.7); border: 1px solid rgba(178, 36, 239, 0.25); }

.mask-icon { font-size: 4rem; margin-bottom: 15px; display: inline-block; animation: maskFloat 3s ease-in-out infinite; }
@keyframes maskFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.mask-title { font-size: 1.8rem; font-weight: bold; color: var(--text-primary); margin-bottom: 10px; }
.mask-desc { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 25px; line-height: 1.6; }

/* ===== 标签选择器（投递区） ===== */
.tag-selector { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 20px; }
.tag-btn {
    padding: 8px 16px; border-radius: 20px; border: 1px solid var(--border-glass);
    background: transparent; color: var(--text-secondary); cursor: pointer;
    font-size: 0.9rem; transition: all 0.3s ease; font-family: inherit;
}
.tag-btn.active, .tag-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border-color: transparent;
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* ===== 主留言输入框 ===== */
.mask-textarea {
    width: 100%; min-height: 140px; padding: 15px; border-radius: 16px;
    border: 1px solid var(--border-glass); background: var(--input-bg);
    color: var(--input-text); font-size: 1rem; resize: vertical; margin-bottom: 20px;
    box-sizing: border-box; font-family: inherit;
}
.mask-textarea:focus { outline: none; border-color: #764ba2; box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2); }
[data-theme="dark"] .mask-textarea { background: rgba(255,255,255,0.03); color: var(--text-primary); }

/* ===== 提交按钮 ===== */
.mask-submit {
    width: 100%; padding: 14px; border: none; border-radius: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #b224ef 100%);
    background-size: 200% 200%; animation: gradientShift 6s ease infinite;
    color: #fff; font-weight: bold; font-size: 1.1rem; cursor: pointer;
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.4); transition: transform 0.2s; font-family: inherit;
}
.mask-submit:hover { transform: translateY(-2px); }
.mask-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
@keyframes gradientShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* ===== 树洞回音壁 ===== */
.whisper-wall { margin-top: 50px; }
.whisper-wall-title { text-align: center; color: var(--text-primary); margin-bottom: 20px; font-size: 1.4rem; }

/* ===== 过滤标签组 ===== */
.filter-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 25px; }
.filter-tag-btn {
    padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border-glass);
    background: transparent; color: var(--text-secondary); cursor: pointer;
    font-size: 0.85rem; transition: all 0.3s ease; font-family: inherit;
}
.filter-tag-btn.active, .filter-tag-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; border-color: transparent;
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.3);
}

/* ===== 留言卡片 ===== */
.whisper-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(118, 75, 162, 0.15); border-left: 5px solid #764ba2;
    padding: 20px; border-radius: 14px; margin-bottom: 20px; text-align: left;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04); transition: transform 0.2s, box-shadow 0.2s;
}
[data-theme="dark"] .whisper-item {
    background: rgba(45, 42, 36, 0.6); border-color: rgba(178, 36, 239, 0.2); border-left-color: #b224ef;
}
.whisper-item:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

.whisper-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 6px; }
.whisper-tag {
    display: inline-block; font-size: 0.75rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; padding: 4px 12px; border-radius: 12px; font-weight: 600;
}
.whisper-author { font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.whisper-content {
    font-size: 1rem; color: var(--text-primary); line-height: 1.7;
    margin-bottom: 12px; word-break: break-word; white-space: pre-wrap;
}
.whisper-actions { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.whisper-action-btn {
    background: transparent; border: none; color: var(--text-light); cursor: pointer;
    display: flex; align-items: center; gap: 4px; transition: all 0.2s;
    font-family: inherit; padding: 5px 12px; border-radius: 6px; font-size: 0.85rem;
}
.whisper-action-btn:hover { color: #764ba2; background: rgba(118, 75, 162, 0.1); }
.whisper-date { color: var(--text-light); font-size: 0.8rem; }

/* ===== 嵌套回复区 ===== */
.whisper-replies {
    margin-top: 15px; padding-left: 16px;
    border-left: 2px dashed rgba(118, 75, 162, 0.3);
    display: flex; flex-direction: column; gap: 12px;
}
.reply-item { background: rgba(0,0,0,0.03); padding: 14px; border-radius: 10px; border: 1px solid rgba(118, 75, 162, 0.08); }
[data-theme="dark"] .reply-item { background: rgba(255,255,255,0.04); border-color: rgba(178, 36, 239, 0.1); }
.reply-item .whisper-content { margin-bottom: 4px; font-size: 0.95rem; }
.reply-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.reply-author { font-size: 0.8rem; color: #764ba2; font-weight: 600; }
.reply-date { font-size: 0.75rem; color: var(--text-light); }

/* ===== 内联回复输入框 ===== */
.inline-reply-box { margin-top: 14px; display: flex; gap: 10px; animation: fadeInUp 0.3s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.inline-reply-box textarea {
    flex: 1; padding: 12px; border-radius: 10px;
    border: 1px solid var(--border-glass); background: var(--input-bg);
    color: var(--input-text); font-family: inherit; font-size: 0.95rem;
    resize: none; height: 70px; outline: none;
}
.inline-reply-box textarea:focus { border-color: #764ba2; box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.15); }
.inline-reply-box button {
    padding: 0 20px; background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; border: none; border-radius: 10px; cursor: pointer;
    font-weight: 600; font-family: inherit; transition: transform 0.2s; white-space: nowrap;
}
.inline-reply-box button:hover { transform: scale(1.05); }

/* ===== 分页控件 ===== */
.pagination-container { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 30px; }
.page-btn {
    padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border-glass);
    background: var(--card-bg); color: var(--text-primary); cursor: pointer; font-family: inherit;
    transition: all 0.2s; font-size: 0.9rem; display: flex; align-items: center; gap: 6px;
}
.page-btn:hover:not(:disabled) { border-color: #764ba2; color: #764ba2; transform: translateY(-1px); }
.page-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.page-info { font-size: 0.9rem; color: var(--text-secondary); font-weight: 600; }

/* ===== 登录拦截 & 空状态 ===== */
.login-gate { padding: 40px 20px; text-align: center; }
.login-gate h2 { color: var(--text-primary); margin-bottom: 15px; }
.login-gate p { color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.empty-state { text-align: center; color: var(--text-light); padding: 30px 20px; font-size: 0.95rem; }

/* ===== 页脚注释 ===== */
.footer-note { margin-top: 40px; color: var(--text-secondary); font-size: 0.85rem; opacity: 0.7; text-align: center; }

/* ===== 分页控件（含页码数字） ===== */
.pagination-container {
    display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 30px;
}
.page-btn {
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: var(--card-bg); color: var(--text-primary);
    cursor: pointer; font-family: inherit; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.page-btn:hover:not(:disabled) { border-color: #764ba2; color: #764ba2; transform: translateY(-1px); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.page-numbers {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.page-num-btn {
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--border-glass);
    background: var(--card-bg); color: var(--text-primary);
    cursor: pointer; font-family: inherit; font-size: 0.9rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.page-num-btn:hover { border-color: #764ba2; color: #764ba2; transform: translateY(-1px); }
.page-num-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; border-color: transparent;
    box-shadow: 0 4px 12px rgba(118, 75, 162, 0.35);
}
.page-dots {
    width: 30px; text-align: center;
    color: var(--text-light); font-size: 1rem; user-select: none;
}

/* ===== 字数计数器 ===== */
.char-counter {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: -14px;
    margin-bottom: 16px;
    padding-right: 4px;
    transition: color 0.2s;
}
.char-counter.warning { color: var(--accent-coral); font-weight: 600; }
.char-counter.danger { color: #e74c3c; font-weight: bold; }

/* 回复框容器（包含 textarea + 计数器） */
.reply-input-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.reply-char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
    transition: color 0.2s;
}
.reply-char-counter.warning { color: var(--accent-coral); font-weight: 600; }
.reply-char-counter.danger { color: #e74c3c; font-weight: bold; }

/* 调整回复框布局适配新结构 */
.inline-reply-box {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-end;
    animation: fadeInUp 0.3s ease;
}

/* ===== 未登录分类锁定按钮 ===== */
.filter-tag-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
    position: relative;
}
.filter-tag-btn.locked:hover {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-glass);
    box-shadow: none;
    transform: none;
}

/* ===== 未登录限制提示 ===== */
.guest-limit-notice {
    text-align: center;
    margin-top: 25px;
    padding: 20px;
    background: rgba(118, 75, 162, 0.06);
    border: 1px dashed rgba(118, 75, 162, 0.3);
    border-radius: 14px;
}
.guest-limit-notice p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* ===== 表情面板与工具栏 ===== */
.mask-textarea-wrap { position: relative; margin-bottom: 20px; }
.input-toolbar { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-top: 8px; 
}
.emoji-btn { 
    background: none; border: none; font-size: 1.2rem; cursor: pointer; 
    padding: 4px 8px; color: var(--text-light); transition: transform 0.2s; 
}
.emoji-btn:hover { transform: scale(1.2); }

.emoji-picker {
    position: absolute; bottom: 100%; left: 0; margin-bottom: 8px;
    background: var(--card-bg); border: 1px solid var(--border-glass);
    border-radius: 12px; padding: 10px; display: grid;
    grid-template-columns: repeat(8, 1fr); gap: 6px;
    box-shadow: var(--shadow-hover); z-index: 100; width: 280px;
}
.emoji-picker button {
    background: none; border: none; font-size: 1.2rem; cursor: pointer;
    padding: 4px; border-radius: 6px; transition: background 0.2s;
}
.emoji-picker button:hover { background: rgba(0,0,0,0.05); }
[data-theme="dark"] .emoji-picker button:hover { background: rgba(255,255,255,0.1); }

/* ===== 置顶与星标标识 ===== */
.whisper-pin-badge {
    background: var(--accent-orange); color: #fff; font-size: 0.7rem;
    padding: 2px 8px; border-radius: 10px; font-weight: 600; margin-right: 8px;
}
.whisper-star-badge { 
    color: #F9C74F; font-size: 0.85rem; margin-left: 6px; font-weight: 600; 
}

/* ===== 管理员操作区 ===== */
.admin-actions {
    display: flex; gap: 10px; margin-top: 12px; padding-top: 10px;
    border-top: 1px dashed var(--border-glass);
}
.admin-action-btn {
    background: rgba(0,0,0,0.03); border: 1px solid var(--border-glass);
    padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; cursor: pointer;
    color: var(--text-secondary); transition: all 0.2s; font-family: inherit;
}
.admin-action-btn:hover { 
    background: var(--accent-orange); color: #fff; border-color: var(--accent-orange); 
}
.admin-action-btn.active { 
    background: #F9C74F; color: #2D2A24; border-color: #F9C74F; 
}

/* ===== 点赞按钮 ===== */
.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.like-btn.liked .like-icon {
    animation: likePopIn 0.3s ease;
}
@keyframes likePopIn {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}
.like-count {
    font-size: 0.8rem;
    color: var(--text-light);
    min-width: 12px;
}
.like-btn.liked .like-count {
    color: var(--accent-coral);
    font-weight: 600;
}

/* ===== 长文折叠 ===== */
.whisper-content .fold-toggle-btn {
    display: inline-block;
    margin-top: 8px;
    background: none;
    border: none;
    color: #764ba2;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    font-family: inherit;
}
.whisper-content .fold-toggle-btn:hover {
    background: rgba(118, 75, 162, 0.1);
}
[data-theme="dark"] .whisper-content .fold-toggle-btn {
    color: #b224ef;
}
[data-theme="dark"] .whisper-content .fold-toggle-btn:hover {
    background: rgba(178, 36, 239, 0.1);
}

/* ===== 表情面板与工具栏 ===== */
.mask-textarea-wrap { position: relative; margin-bottom: 20px; }
.input-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px;
}
.emoji-btn {
    background: none; border: none; font-size: 1.2rem; cursor: pointer;
    padding: 4px 8px; color: var(--text-light); transition: transform 0.2s;
}
.emoji-btn:hover { transform: scale(1.2); }
.emoji-picker {
    position: absolute; bottom: 100%; left: 0; margin-bottom: 8px;
    background: var(--card-bg); border: 1px solid var(--border-glass);
    border-radius: 12px; padding: 10px; display: grid;
    grid-template-columns: repeat(8, 1fr); gap: 6px;
    box-shadow: var(--shadow-hover); z-index: 100; width: 280px;
}
.emoji-picker button {
    background: none; border: none; font-size: 1.2rem; cursor: pointer;
    padding: 4px; border-radius: 6px; transition: background 0.2s;
}
.emoji-picker button:hover { background: rgba(0,0,0,0.05); }
[data-theme="dark"] .emoji-picker button:hover { background: rgba(255,255,255,0.1); }

/* ===== 置顶与星标标识 ===== */
.whisper-pin-badge {
    background: var(--accent-orange); color: #fff; font-size: 0.7rem;
    padding: 2px 8px; border-radius: 10px; font-weight: 600; margin-right: 4px;
}
.whisper-star-badge {
    color: #F9C74F; font-size: 0.85rem; margin-left: 6px; font-weight: 600;
}

/* ===== 管理员操作区 ===== */
.admin-actions {
    display: flex; gap: 10px; margin-top: 12px; padding-top: 10px;
    border-top: 1px dashed var(--border-glass);
}
.admin-action-btn {
    background: rgba(0,0,0,0.03); border: 1px solid var(--border-glass);
    padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; cursor: pointer;
    color: var(--text-secondary); transition: all 0.2s; font-family: inherit;
}
.admin-action-btn:hover {
    background: var(--accent-orange); color: #fff; border-color: var(--accent-orange);
}
.admin-action-btn.active {
    background: #F9C74F; color: #2D2A24; border-color: #F9C74F;
}