/* ===== 游戏说明面板 ===== */
.guide-version-note {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 10px;
    font-style: italic;
    opacity: 0.7;
}

.guide-search-input {
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: all 0.2s;
}

.guide-search-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 5px rgba(201, 153, 58, 0.2);
}

.guide-sections {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.guide-section {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.guide-section-header {
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gold);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    user-select: none;
    font-family: var(--font-serif);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.guide-section-header::after {
    content: '+';
    font-size: 16px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.guide-section-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.guide-section.open .guide-section-header {
    border-bottom: 1px solid var(--border-color);
}

.guide-section.open .guide-section-header::after {
    content: '-';
}

.guide-section-body {
    display: none;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.guide-section.open .guide-section-body {
    display: block;
}

.guide-section-body h4 {
    font-size: 13px;
    color: var(--accent-jade);
    margin: 10px 0 4px;
    font-family: var(--font-serif);
}

.guide-section-body h4:first-child {
    margin-top: 2px;
}

.guide-section-body p {
    margin: 4px 0;
}

.guide-section-body strong {
    color: var(--text-primary);
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin: 6px 0;
    font-size: 12px;
}

.guide-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-gold);
    padding: 5px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
}

.guide-table td {
    padding: 4px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}

.guide-table tr:last-child td {
    border-bottom: none;
}

/* ===== 道友系统 ===== */

/* 道友面板说明文字 */
.friend-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.5;
}

/* 搜索栏 */
.friend-search-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.friend-search-bar input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 12px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.friend-search-bar input:focus {
    border-color: var(--accent-jade);
}

.friend-search-bar input::placeholder {
    color: var(--text-muted);
}

/* 分区标题 */
.friend-section-title {
    font-size: 13px;
    color: var(--accent-gold);
    margin: 12px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(201, 153, 58, 0.15);
    font-family: var(--font-serif);
    letter-spacing: 1px;
}

/* ---- 道友列表 ---- */
.friend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.friend-item:hover {
    border-color: var(--accent-jade);
    background: rgba(71, 189, 149, 0.03);
}

.friend-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.friend-online-dot,
.friend-offline-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.friend-online-dot {
    background: #4caf50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
    animation: friend-pulse 2s ease-in-out infinite;
}

@keyframes friend-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(76, 175, 80, 0.4); }
    50% { box-shadow: 0 0 10px rgba(76, 175, 80, 0.7); }
}

.friend-offline-dot {
    background: var(--text-muted);
    opacity: 0.35;
}

.friend-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
    font-family: var(--font-serif);
}

.friend-realm {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.friend-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 8px;
}

.btn-friend-action {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.btn-friend-chat {
    color: var(--accent-jade);
    border-color: rgba(61, 171, 151, 0.4);
    background: rgba(61, 171, 151, 0.06);
}

.btn-friend-chat:hover {
    background: var(--accent-jade);
    color: var(--text-on-gold);
    border-color: var(--accent-jade);
}

.btn-friend-remove {
    color: var(--text-muted);
    padding: 4px 6px;
}

.btn-friend-remove:hover {
    color: var(--accent-crimson);
    border-color: var(--accent-crimson);
    background: rgba(184, 48, 48, 0.08);
}

/* ---- 拜帖 ---- */
.friend-request-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(201, 153, 58, 0.04);
    border: 1px solid rgba(201, 153, 58, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    border-left: 3px solid var(--accent-gold);
}

.friend-request-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.friend-request-actions {
    display: flex;
    gap: 6px;
}

.btn-friend-accept,
.btn-friend-reject {
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: var(--font-serif);
    font-size: 11px;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.btn-friend-accept {
    background: var(--gradient-gold);
    color: var(--text-on-gold);
    font-weight: 600;
}

.btn-friend-accept:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.btn-friend-reject {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.btn-friend-reject:hover {
    border-color: var(--text-muted);
    color: var(--text-secondary);
}

/* ---- 搜索结果 ---- */
.friend-search-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(71, 189, 149, 0.03);
    border: 1px solid rgba(71, 189, 149, 0.15);
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    border-left: 3px solid var(--accent-jade);
}

.friend-relation-tag {
    font-size: 10px;
    color: var(--text-muted);
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    white-space: nowrap;
    margin-left: auto;
}

.friend-searching {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 12px;
    font-style: italic;
}

/* 空状态 */
.friend-empty {
    text-align: center;
    padding: 24px 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.friend-empty-hint {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.7;
    margin-top: 4px;
}

/* ---- 私信视图 ---- */
.friend-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 8px;
}

.friend-chat-header span {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-gold);
    font-family: var(--font-serif);
    letter-spacing: 1px;
}

.btn-friend-back {
    padding: 4px 12px;
    font-size: 12px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-serif);
    transition: all 0.2s;
}

.btn-friend-back:hover {
    border-color: var(--accent-jade);
    color: var(--accent-jade);
    background: rgba(61, 171, 151, 0.06);
}

.friend-chat-messages {
    height: 320px;
    overflow-y: auto;
    padding: 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
}

/* 私信气泡 */
.pm-msg {
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    position: relative;
}

.pm-msg-mine {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(61, 171, 151, 0.2), rgba(61, 171, 151, 0.12));
    border: 1px solid rgba(61, 171, 151, 0.25);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}

.pm-msg-other {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.pm-msg-content {
    word-break: break-word;
}

.pm-msg-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
    opacity: 0.7;
}

.pm-msg-mine .pm-msg-time {
    text-align: right;
}

.pm-msg-other .pm-msg-time {
    text-align: left;
}

/* ---- 道友按钮未读徽章 ---- */
.friend-btn-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: var(--accent-crimson, #e74c3c);
    color: transparent;
    border-radius: 50%;
    font-size: 0;
    padding: 0;
    overflow: hidden;
    animation: court-badge-pulse 1.5s ease-in-out infinite;
}

#friendBtn {
    position: relative;
}

#friendRequestBadge {
    display: inline-block;
    min-width: 14px;
    height: 14px;
    background: var(--accent-gold);
    color: var(--text-on-gold);
    border-radius: 7px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    line-height: 14px;
    padding: 0 3px;
    margin-left: 4px;
    vertical-align: middle;
}
/* ==========================================================================
   Sect (宗门) Styles
   ========================================================================== */

#sectUnjoinedView, #sectJoinedView {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.sect-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    background: var(--bg-card);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.sect-rules-summary {
    list-style: none;
    padding: 10px 12px;
    margin: 0;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.sect-rules-summary li {
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border-color);
}
.sect-rules-summary li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.sect-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

.sect-tab {
    flex: 1;
    padding: 6px 0;
    font-size: 12px;
    font-family: var(--font-serif);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
}

.sect-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sect-tab.active {
    background: var(--gradient-gold);
    border-color: var(--accent-gold);
    color: var(--text-on-gold);
    font-weight: 600;
}

.sect-tab-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

/* --- 大殿 (Info) --- */
.sect-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(201, 153, 58, 0.08), rgba(201, 153, 58, 0.02));
    border: 1px solid rgba(201, 153, 58, 0.15);
}

.sect-info-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
}

.sect-level-badge {
    background: var(--gradient-gold);
    color: var(--text-on-gold);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
}

.sect-my-status {
    padding: 4px 0 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* 宗门状态网格 */
.sect-status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.sect-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
}

.sect-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.sect-stat-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.sect-stat-value.sect-stat-gold {
    color: var(--text-gold);
}

/* --- 自建宗门统计网格 --- */
.psect-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.psect-stat-card {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 6px;
}

.psect-stat-card.psect-stat-wide {
    grid-column: 1 / -1;
}

.psect-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.psect-stat-val {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.psect-val-gold { color: var(--text-gold); }
.psect-val-info { color: var(--text-info); }

/* --- 自建宗门设施按钮 --- */
.psect-facility-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.psect-facility-btn {
    flex: 1;
    min-width: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 8px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.psect-facility-icon {
    font-size: 16px;
}

/* --- 自建宗门日志容器 --- */
.psect-logs-box {
    max-height: 160px;
    overflow-y: auto;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.15);
}

/* --- 自建宗门表单标签 --- */
.psect-field-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

/* --- 自建宗门复选框标签 --- */
.psect-checkbox-label {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    color: var(--text-gray);
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.psect-checkbox-label.psect-checkbox-checked {
    color: var(--text-warning);
    background: rgba(255, 170, 0, 0.06);
    border-color: rgba(255, 170, 0, 0.15);
}

.sect-role-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sect-role-row:last-of-type {
    border-bottom: none;
}

.sect-label {
    color: var(--text-muted);
    font-size: 12px;
}

.sect-value {
    color: var(--text-gold);
    font-size: 13px;
    font-weight: 500;
}

.sect-role {
    color: var(--accent-purple);
    font-weight: 600;
}

.sect-contrib {
    color: var(--text-gold);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sect-section-title {
    font-size: 13px;
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    letter-spacing: 2px;
    font-weight: 500;
    opacity: 0.85;
}

.sect-notice-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.sect-notice-text {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.sect-notice-box textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: var(--radius-sm);
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
    font-size: 13px;
    margin-bottom: 8px;
    outline: none;
    transition: border-color 0.2s;
}
.sect-notice-box textarea:focus {
    border-color: var(--accent-gold);
}

/* --- 事务 (Tasks) --- */
.sect-task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

.sect-task-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sect-task-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    padding-right: 10px;
}

.sect-task-name {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}

.sect-task-desc {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.sect-task-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 60px;
}

.sect-task-progress {
    font-size: 11px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.sect-task-reward {
    color: var(--text-jade);
    font-size: 11px;
    font-weight: 500;
}

/* --- 底蕴 (Storage/Donate) --- */
.sect-donate-selector {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.sect-donate-selector select {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.sect-donate-selector select:focus {
    border-color: var(--accent-gold);
}

.sect-donate-selector input {
    width: 80px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
}
.sect-donate-selector input:focus {
    border-color: var(--accent-gold);
}

/* --- 珍宝阁筛选下拉 --- */
.sect-shop-select {
    display: inline-flex;
    align-items: center;
    padding: 4px 26px 4px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-serif);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0c060' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px;
}
.sect-shop-select:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-gold);
}

.sect-btn-buy {
    background: linear-gradient(135deg, rgba(224, 192, 96, 0.15), rgba(224, 192, 96, 0.3));
    color: var(--accent-gold);
    border: 1px solid rgba(224, 192, 96, 0.5);
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.sect-btn-buy:hover {
    background: linear-gradient(135deg, rgba(224, 192, 96, 0.3), rgba(224, 192, 96, 0.5));
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(224, 192, 96, 0.2);
}

.sect-shop-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
}

.sect-shop-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.sect-shop-item-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.sect-shop-item-name {
    font-size: 13px;
    font-weight: 600;
}

.sect-shop-item-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

.sect-shop-item-price {
    font-size: 12px;
    color: var(--text-gold);
    font-weight: 600;
}

.sect-shop-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sect-shop-qty {
    width: 48px;
    height: 30px;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.sect-shop-qty:focus {
    border-color: var(--border-gold);
}

/* --- 名册 (Members) --- */
.sect-members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 13px;
}

.sect-member-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    overflow-y: auto;
}

.sect-member-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    font-size: 13px;
}

.sect-member-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sect-member-name {
    color: var(--text-primary);
}

.sect-member-realm {
    color: var(--text-muted);
    font-size: 11px;
}

.sect-member-stats {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sect-member-role {
    color: var(--accent-purple);
    font-weight: 600;
    font-size: 12px;
}

.sect-member-contrib {
    color: var(--text-gold);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.chat-tabs {
    display: flex;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.chat-tab {
    background: transparent;
    color: var(--text-gray);
    border: none;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    padding: 0 8px;
}
.chat-tab.active {
    color: var(--text-gold);
    font-weight: bold;
}
.chat-msg-role {
    font-size: 11px;
    padding: 1px 4px;
    border-radius: 4px;
    margin-right: 4px;
    border: 1px solid var(--text-gold);
    color: var(--text-gold);
}
.chat-msg-time {
    font-size: 10px;
    color: var(--text-muted);
    margin-right: 4px;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Trial Tower (天道试炼塔) Styles
   ========================================================================== */

.trial-tower-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
}

.trial-tower-card-header {
    text-align: center;
    font-size: 14px;
    color: var(--text-gold);
    font-family: var(--font-serif);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.trial-tower-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 12px;
}

.trial-tower-hint {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    padding: 8px 0;
}

.trial-tower-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.trial-tower-label {
    color: var(--text-muted);
}

.trial-tower-value {
    color: var(--text-primary);
    font-weight: 600;
}

.trial-tower-free {
    text-align: center;
    color: var(--accent-jade);
    font-size: 13px;
    margin: 8px 0;
    font-weight: 600;
}

.trial-tower-cost {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 8px 0;
}

.btn-trial-start {
    width: 100%;
    margin-top: 8px;
}

/* -- 活跃试炼 -- */
.trial-tower-player-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.trial-tower-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.trial-tower-bar-label {
    min-width: 24px;
    color: var(--text-muted);
    font-weight: 600;
}

.trial-tower-bar-track {
    flex: 1;
    height: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 5px;
    overflow: hidden;
}

.trial-tower-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.4s ease;
}

.trial-tower-bar-fill.hp {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
}

.trial-tower-bar-fill.mp {
    background: linear-gradient(90deg, #2980b9, #3498db);
}

.trial-tower-bar-text {
    min-width: 70px;
    text-align: right;
    color: var(--text-secondary);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

/* -- Boss -- */
.trial-tower-boss {
    background: rgba(184, 48, 48, 0.06);
    border: 1px solid rgba(184, 48, 48, 0.2);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin: 10px 0;
}

.trial-tower-boss-name {
    font-size: 14px;
    color: var(--accent-crimson);
    font-weight: 600;
    font-family: var(--font-serif);
    margin-bottom: 4px;
}

.trial-tower-boss-mod {
    display: inline-block;
    font-size: 11px;
    background: rgba(184, 48, 48, 0.15);
    color: var(--accent-crimson);
    padding: 1px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.trial-tower-boss-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* -- 天赋选择 -- */
.trial-buff-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.trial-buff-card {
    padding: 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.trial-buff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.trial-buff-common {
    border-left: 3px solid var(--text-secondary);
}

.trial-buff-rare {
    border-left: 3px solid #5b9bd5;
    background: rgba(91, 155, 213, 0.04);
}

.trial-buff-legendary {
    border-left: 3px solid var(--accent-gold);
    background: rgba(201, 153, 58, 0.06);
}

.trial-buff-rarity {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.trial-buff-common .trial-buff-rarity { color: var(--text-muted); }
.trial-buff-rare .trial-buff-rarity { color: #5b9bd5; }
.trial-buff-legendary .trial-buff-rarity { color: var(--accent-gold); }

.trial-buff-name {
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-serif);
    color: var(--text-primary);
    margin-bottom: 2px;
}

.trial-buff-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* -- 已选天赋标签 -- */
.trial-tower-buffs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0;
}

.trial-tower-buff-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(201, 153, 58, 0.08);
    border: 1px solid rgba(201, 153, 58, 0.2);
    color: var(--text-gold);
}

.trial-tower-buffs {
    font-size: 11px;
    color: var(--text-muted);
}

/* -- 叠加属性面板 -- */
.trial-tower-stats-panel {
    margin: 6px 0 4px;
    padding: 6px 8px;
    background: rgba(100, 180, 255, 0.06);
    border: 1px solid rgba(100, 180, 255, 0.15);
    border-radius: 6px;
}
.trial-tower-stats-title {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 4px;
}
.trial-tower-stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    justify-content: center;
}
.trial-stat-item {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(100, 180, 255, 0.1);
    border: 1px solid rgba(100, 180, 255, 0.2);
    color: var(--text-cyan, #7ec8e3);
}
.trial-stat-legendary {
    background: rgba(201, 153, 58, 0.12);
    border-color: rgba(201, 153, 58, 0.3);
    color: var(--text-gold);
}

/* -- 操作按钮 -- */
.trial-tower-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-trial-fight {
    flex: 1;
}

.btn-trial-giveup {
    flex-shrink: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.btn-trial-giveup:hover {
    border-color: var(--accent-crimson);
    color: var(--accent-crimson);
}

/* -- 结算 -- */
.trial-tower-settlement {
    border-color: rgba(201, 153, 58, 0.25);
}

.trial-tower-new-record {
    text-align: center;
    color: var(--accent-gold);
    font-size: 16px;
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: 2px;
    margin: 4px 0 12px;
    animation: trial-record-pulse 1.5s ease-in-out infinite;
}

@keyframes trial-record-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.trial-tower-reward {
    text-align: center;
    color: var(--accent-jade);
    font-size: 14px;
    font-weight: 600;
    margin: 8px 0;
    padding: 8px;
    background: rgba(61, 171, 151, 0.06);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(61, 171, 151, 0.15);
}

/* -- 排行榜 -- */
.trial-ranking-list {
    max-height: 300px;
    overflow-y: auto;
}

.trial-ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.trial-ranking-table th {
    text-align: left;
    color: var(--text-muted);
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.trial-ranking-table td {
    padding: 6px 8px;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.trial-ranking-table tr:first-child td {
    color: var(--accent-gold);
    font-weight: 600;
}

.trial-ranking-self td {
    background: rgba(201, 153, 58, 0.06);
    color: var(--accent-gold);
    font-weight: 600;
}

/* -- 面板内战斗日志 -- */
.trial-combat-log {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.5;
}

.trial-log-line {
    margin: 0;
    padding: 1px 0;
    color: var(--text-secondary);
    animation: trial-log-fadein 0.15s ease;
}

@keyframes trial-log-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.trial-log-crit {
    color: var(--accent-crimson);
    font-weight: 600;
}

.trial-log-victory {
    color: var(--accent-jade);
    font-weight: 600;
}

.trial-log-defeat {
    color: var(--text-muted);
    font-style: italic;
}

.trial-log-buff {
    color: var(--accent-gold);
    font-weight: 600;
}

/* -- 奖励已领取 -- */
.trial-reward-claimed {
    color: var(--accent-jade);
}

/* -- Boss HP 条 -- */
.trial-tower-bar-fill.boss-hp {
    background: linear-gradient(90deg, #c0392b, #e74c3c);
}

/* -- 试炼称号(聊天标签) -- */
.chat-msg-trial-title {
    display: inline-block;
    background: linear-gradient(135deg, #f1c40f, #e67e22);
    color: #1a1a2e;
    font-size: 0.7em;
    padding: 0 5px;
    border-radius: 3px;
    margin-right: 4px;
    font-weight: 700;
    vertical-align: middle;
}

/* -- 排行榜第一名金色高亮 -- */
.trial-ranking-table tr:nth-child(2) {
    /* nth-child(2) = 数据第1行(跳过表头) */
    background: linear-gradient(90deg, rgba(241,196,15,0.15), transparent);
}
.trial-ranking-table tr:nth-child(2) td:first-child {
    color: #f1c40f;
    font-weight: 700;
}

/* 秘境 UI 浅色主题适配 */
html.theme-light .dungeon-control-deck {
    background: transparent;
    border: none;
    box-shadow: none;
}

html.theme-light .dungeon-actions-wrapper {
    background: transparent;
    border-top: none;
}

html.theme-light .dungeon-chat-section {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(184, 70, 62, 0.15);
    box-shadow: 0 2px 8px rgba(40, 40, 40, 0.04);
}

html.theme-light .btn-dungeon-start {
    background: linear-gradient(135deg, rgba(184, 70, 62, 0.12), rgba(184, 70, 62, 0.04)) !important;
    color: #b8463e !important;
    border: 1px solid rgba(184, 70, 62, 0.3) !important;
    font-weight: 800;
}

html.theme-light .btn-dungeon-start:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(184, 70, 62, 0.2), rgba(184, 70, 62, 0.08)) !important;
    text-shadow: none;
    box-shadow: 0 4px 12px rgba(184, 70, 62, 0.15);
}

html.theme-light .dungeon-section-title {
    color: #b8463e; /* 与现有红色标头统一 */
}

html.theme-light .dungeon-room-actions-top .btn-action {
    background: rgba(58, 106, 122, 0.06) !important;
    color: #3a6a7a !important;
    border-color: rgba(58, 106, 122, 0.15) !important;
}

html.theme-light .btn-dungeon-leave-text {
    color: #a83030;
    text-decoration-color: rgba(168, 48, 48, 0.3);
}

html.theme-light .btn-dungeon-leave-text:hover {
    color: #c0392b;
}

html.theme-light .dungeon-prep-actions .btn-action {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(60, 60, 60, 0.15);
    color: var(--text-primary);
}

/* ==========================================================================
   Feedback (用户反馈) Styles
   ========================================================================== */

.feedback-tabs {
    display: flex;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.feedback-tab {
    background: transparent;
    color: var(--text-gray);
    border: none;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.feedback-tab.active {
    color: var(--text-gold);
    font-weight: bold;
}

.feedback-tab:hover {
    color: var(--text-primary);
}

/* -- 提交表单 -- */
.feedback-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feedback-field label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.feedback-field select,
.feedback-field textarea {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.feedback-field select:focus,
.feedback-field textarea:focus {
    border-color: var(--accent-gold);
}

.feedback-field textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* -- 反馈列表 -- */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.feedback-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    transition: border-color 0.2s;
}

.feedback-card:hover {
    border-color: rgba(201, 153, 58, 0.3);
}

.feedback-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.feedback-category {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(201, 153, 58, 0.1);
    color: var(--text-gold);
    border: 1px solid rgba(201, 153, 58, 0.2);
}

.feedback-status {
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.feedback-status-pending {
    background: rgba(241, 196, 15, 0.1);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.25);
}

.feedback-status-approved {
    background: rgba(61, 171, 151, 0.1);
    color: var(--accent-jade);
    border: 1px solid rgba(61, 171, 151, 0.25);
}

.feedback-status-rejected {
    background: rgba(184, 48, 48, 0.08);
    color: var(--accent-crimson);
    border: 1px solid rgba(184, 48, 48, 0.2);
}

.feedback-status-processing {
    background: rgba(91, 155, 213, 0.1);
    color: #5b9bd5;
    border: 1px solid rgba(91, 155, 213, 0.25);
}

.feedback-player-name {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.feedback-card-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.feedback-card-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.feedback-card-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* -- 对话线程 -- */
.feedback-thread {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feedback-msg {
    padding: 6px 10px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.feedback-msg-admin {
    background: rgba(201, 153, 58, 0.06);
    border-left: 3px solid var(--accent-gold);
}

.feedback-msg-user {
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--border-color);
}

.feedback-msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.feedback-msg-sender {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.feedback-msg-admin .feedback-msg-sender {
    color: var(--text-gold);
    font-family: var(--font-serif);
    letter-spacing: 1px;
}

.feedback-msg-time {
    font-size: 10px;
    color: var(--text-muted);
}

.feedback-msg-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* -- 管理员操作 -- */
.feedback-admin-filter {
    margin-bottom: 10px;
}

.feedback-admin-filter select {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.feedback-admin-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.btn-feedback-approve,
.btn-feedback-reject,
.btn-feedback-reply,
.btn-feedback-delete,
.btn-feedback-send-reply {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.btn-feedback-approve:hover {
    border-color: var(--accent-jade);
    color: var(--accent-jade);
}

.btn-feedback-reject:hover {
    border-color: var(--accent-crimson);
    color: var(--accent-crimson);
}

.btn-feedback-reply:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.btn-feedback-delete:hover {
    border-color: var(--accent-crimson);
    color: var(--accent-crimson);
}

.btn-feedback-send-reply {
    background: rgba(201, 153, 58, 0.1);
    border-color: rgba(201, 153, 58, 0.3);
    color: var(--text-gold);
}

.btn-feedback-send-reply:hover {
    background: rgba(201, 153, 58, 0.2);
}

/* -- 回复输入框 -- */
.feedback-reply-input {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feedback-reply-input textarea {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-height: 50px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.feedback-reply-input textarea:focus {
    border-color: var(--accent-gold);
}

