/* ========== 台词征集页面样式 ========== */

.page-content {
    overflow-y: auto;
    max-height: calc(100vh - 48px - 42px);
    scrollbar-width: thin;
    scrollbar-color: var(--vbs) transparent;
}

/* 模式切换 */
.mode-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.mode-tab {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.mode-tab:hover { border-color: rgba(238,17,102,0.4); color: #fff; }
.mode-tab.active { background: var(--vbs); border-color: var(--vbs); color: #fff; }

/* 区块 */
.lines-section { margin-bottom: 2rem; }

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vbs);
    margin-bottom: 0.8rem;
    padding-left: 0.6rem;
    border-left: 3px solid var(--vbs);
}

.lines-hint {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.req { color: var(--vbs); }

/* 条目卡片 */
.entry-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
}

.entry-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.entry-num {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.btn-remove-entry {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    transition: color 0.2s;
}

.btn-remove-entry:hover { color: #ff5555; }

/* 角色选择器 */
.char-picker {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
}

.char-btn {
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.12);
    color: var(--cc);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.char-btn:hover { border-color: var(--cc); background: rgba(255,255,255,0.08); }
.char-btn.selected { background: var(--cc); color: #fff; border-color: var(--cc); }

/* 台词输入 */
.line-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    color: #fff;
    outline: none;
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.line-input:focus { border-color: var(--vbs); }

/* 添加按钮 */
.btn-add-entry {
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    width: 100%;
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-bottom: 1.5rem;
}

.btn-add-entry:hover { border-color: var(--vbs); color: var(--vbs); }

/* 提交者信息 */
.info-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.info-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.info-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
}

.info-field input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    color: #fff;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.info-field input:focus { border-color: var(--vbs); }

.btn-submit {
    background: var(--vbs);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.65rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
}

.btn-submit:hover { opacity: 0.85; }
.btn-submit:disabled { opacity: 0.4; cursor: not-allowed; }

/* ========== 台词墙 ========== */
.gallery-filter {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255,255,255,0.05);
    border: 1.5px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.filter-btn[data-char]:not([data-char="all"]) { color: var(--cc); }
.filter-btn:hover { border-color: var(--cc, rgba(255,255,255,0.3)); }
.filter-btn.active { background: var(--cc, var(--vbs)); color: #fff; border-color: var(--cc, var(--vbs)); }
.filter-btn[data-char="all"].active { background: var(--vbs); border-color: var(--vbs); }

.gallery-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* 台词卡片 */
.line-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid var(--char-color);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    transition: border-color 0.2s;
}

.line-card:hover { border-color: rgba(255,255,255,0.15); border-left-color: var(--char-color); }

.line-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.line-char {
    font-size: 0.85rem;
    font-weight: 700;
}

.line-cn {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.line-text {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin: 0;
}

.line-card-bottom {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.6rem;
}

.btn-like {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-like:hover { border-color: #ff6b8a; color: #ff6b8a; }
.btn-like.liked { background: rgba(255,107,138,0.12); border-color: rgba(255,107,138,0.4); color: #ff6b8a; }

.like-icon { font-size: 0.9rem; }

.empty-hint {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.88rem;
    padding: 2rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20,20,30,0.95);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-size: 0.88rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 200;
    border: 1px solid rgba(255,255,255,0.1);
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(0,200,100,0.4); }
.toast.error { border-color: rgba(255,50,50,0.4); }

/* 响应式 */
@media (max-width: 500px) {
    .info-row { flex-direction: column; gap: 0.6rem; }
    .char-picker { gap: 0.3rem; }
    .char-btn { padding: 0.3rem 0.6rem; font-size: 0.78rem; }
}

/* 管理员查询 */
.admin-query-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.btn-admin-query {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dim);
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-admin-query:hover { border-color: var(--vbs); color: var(--vbs); }
.btn-admin-query:disabled { opacity: 0.6; cursor: default; color: #4cdf8a; border-color: rgba(0,200,100,0.3); }

.admin-key-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}

.admin-key-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    color: #fff;
    outline: none;
    font-family: inherit;
}

.admin-key-input:focus { border-color: var(--vbs); }

.btn-admin-verify {
    background: var(--vbs);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.btn-admin-verify:hover { opacity: 0.85; }

.line-admin-info {
    font-size: 0.75rem;
    color: rgba(255,180,0,0.8);
    margin-top: 0.4rem;
    padding: 0.3rem 0.5rem;
    background: rgba(255,180,0,0.06);
    border-radius: 4px;
}

@media (max-width: 768px) {
    .page-content { padding: 4rem 1.5rem 2rem; max-height: calc(100vh - 48px - 42px); }
    .section-title { font-size: 1rem; }
    
    .mode-tabs { justify-content: center; }
    .mode-tab { padding: 0.4rem 1rem; font-size: 0.85rem; }
    
    .entry-card { padding: 0.8rem; }
    .char-picker { gap: 0.3rem; justify-content: flex-start; }
    .char-btn { padding: 0.3rem 0.6rem; font-size: 0.75rem; flex-grow: 1; text-align: center; }
    
    .info-row { flex-direction: column; gap: 0.8rem; }
    .btn-submit { width: 100%; }
    
    .gallery-filter { overflow-x: auto; padding-bottom: 0.5rem; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .filter-btn { white-space: nowrap; flex-shrink: 0; }
    
    .line-card { padding: 0.8rem; }
    .line-text { font-size: 0.95rem; }
    
    .admin-key-row { flex-direction: column; }
    .btn-admin-verify { width: 100%; }
}
