/* ================================================
   时光服天赋模拟器 - 社交功能样式
   配色与主站一致：背景 #30384c，文字 #fff
   ================================================ */

/* ---------- 用户状态栏（固定顶部） ---------- */
.ts-user-bar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100001;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    border-radius: 0 0 0 12px;
    font-size: 13px;
    color: #fff;
    transition: all 0.3s;
}
.ts-user-bar:hover {
    background: rgba(0,0,0,0.88);
}

/* QQ登录按钮 */
.ts-qq-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #12b7f5, #0d8ecf);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.ts-qq-btn:hover {
    background: linear-gradient(135deg, #0d8ecf, #096d9e);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(18,183,245,0.4);
}
.ts-qq-btn img {
    width: 16px;
    height: 16px;
}

/* 用户头像和信息 */
.ts-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ts-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    object-fit: cover;
}
.ts-user-name {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ts-logout-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.7);
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}
.ts-logout-btn:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
}

/* ---------- 浮动操作按钮（职业页面） ---------- */
.ts-float-btns {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ts-float-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.ts-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.ts-float-btn.save {
    background: linear-gradient(135deg, #52c41a, #389e0d);
}
.ts-float-btn.load {
    background: linear-gradient(135deg, #1890ff, #096dd9);
}
.ts-float-btn.browse {
    background: linear-gradient(135deg, #fa8c16, #d46b08);
}
.ts-float-btn.my {
    background: linear-gradient(135deg, #722ed1, #531dab);
}
.ts-float-btn .btn-tooltip {
    position: absolute;
    right: 54px;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}
.ts-float-btn:hover .btn-tooltip {
    opacity: 1;
}

/* ---------- 面板/弹窗通用样式 ---------- */
.ts-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: ts-fadeIn 0.2s;
}
.ts-overlay.active {
    display: flex;
}
.ts-panel {
    background: #1a1f2e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
    animation: ts-slideUp 0.25s ease-out;
}
.ts-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}
.ts-panel-header h3 {
    margin: 0;
    font-size: 16px;
    color: #fff;
}
.ts-panel-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    flex-shrink: 0;
}
.ts-panel-close:hover {
    color: #ff4d4f;
    background: rgba(255,77,79,0.1);
}
.ts-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
}
.ts-panel-body::-webkit-scrollbar {
    width: 6px;
}
.ts-panel-body::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}
.ts-panel-footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes ts-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes ts-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- 表单控件 ---------- */
.ts-input {
    width: 100%;
    padding: 8px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.ts-input:focus {
    border-color: #1890ff;
}
.ts-input::placeholder {
    color: rgba(255,255,255,0.3);
}
.ts-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

/* ---------- 按钮样式 ---------- */
.ts-btn {
    padding: 7px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #fff;
}
.ts-btn-primary {
    background: linear-gradient(135deg, #1890ff, #096dd9);
}
.ts-btn-primary:hover {
    background: linear-gradient(135deg, #096dd9, #0050b3);
    box-shadow: 0 2px 8px rgba(24,144,255,0.4);
}
.ts-btn-success {
    background: linear-gradient(135deg, #52c41a, #389e0d);
}
.ts-btn-success:hover {
    background: linear-gradient(135deg, #389e0d, #237804);
}
.ts-btn-danger {
    background: linear-gradient(135deg, #ff4d4f, #cf1322);
}
.ts-btn-danger:hover {
    background: linear-gradient(135deg, #cf1322, #a8071a);
}
.ts-btn-ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
}
.ts-btn-ghost:hover {
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}
.ts-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    min-height: 28px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.ts-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ---------- 天赋卡片 ---------- */
.ts-talent-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    transition: all 0.2s;
}
.ts-talent-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.15);
}
.ts-talent-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.ts-talent-card-title {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ts-talent-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 8px;
}
.ts-talent-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* ---------- 投票按钮 ---------- */
.ts-vote-group {
    display: flex;
    align-items: center;
    gap: 2px;
}
.ts-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.ts-vote-btn:hover {
    background: rgba(255,255,255,0.08);
}
.ts-vote-btn.upvote:hover {
    border-color: #52c41a;
    color: #52c41a;
}
.ts-vote-btn.downvote:hover {
    border-color: #ff4d4f;
    color: #ff4d4f;
}
.ts-vote-btn.voted-up {
    background: rgba(82,196,26,0.15);
    border-color: #52c41a;
    color: #52c41a;
}
.ts-vote-btn.voted-down {
    background: rgba(255,77,79,0.15);
    border-color: #ff4d4f;
    color: #ff4d4f;
}
.ts-vote-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---------- 公开/私密标签 ---------- */
.ts-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}
.ts-badge-public {
    background: rgba(82,196,26,0.15);
    color: #52c41a;
    border: 1px solid rgba(82,196,26,0.3);
}
.ts-badge-private {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

/* ---------- 槽位信息 ---------- */
.ts-slots-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}
.ts-slots-info strong {
    color: #ffd700;
}

/* ---------- 推荐区域（首页） ---------- */
.ts-recommend-section {
    max-width: 800px;
    margin: 20px auto;
    padding: 0 16px;
}
.ts-recommend-section h3 {
    color: #ffd700;
    font-size: 18px;
    margin-bottom: 16px;
    text-align: center;
}
.ts-recommend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.ts-recommend-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: #fff;
    display: block;
}
.ts-recommend-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.18);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.ts-recommend-class {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}
.ts-recommend-name {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ts-recommend-score {
    font-size: 13px;
    color: #ffd700;
}
.ts-recommend-owner {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    margin-top: 4px;
}
.ts-recommend-empty {
    text-align: center;
    color: rgba(255,255,255,0.3);
    padding: 30px;
    font-size: 14px;
}

/* ---------- Toast 提示 ---------- */
.ts-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100002;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
    animation: ts-toastIn 0.25s ease-out;
    pointer-events: none;
}
.ts-toast.success { background: rgba(82,196,26,0.9); }
.ts-toast.error { background: rgba(255,77,79,0.9); }
.ts-toast.info { background: rgba(24,144,255,0.9); }
.ts-toast.warn { background: rgba(250,140,22,0.9); }

@keyframes ts-toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* ---------- 加载状态 ---------- */
.ts-loading {
    text-align: center;
    padding: 30px;
    color: rgba(255,255,255,0.4);
}
.ts-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #1890ff;
    border-radius: 50%;
    animation: ts-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}
@keyframes ts-spin {
    to { transform: rotate(360deg); }
}

/* ---------- 确认弹窗 ---------- */
.ts-confirm-content {
    text-align: center;
    padding: 20px 10px;
}
.ts-confirm-content p {
    font-size: 15px;
    color: #fff;
    margin-bottom: 8px;
}
.ts-confirm-content .ts-sub {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* ---------- 兑换区域 ---------- */
.ts-exchange-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-bottom: 14px;
}
.ts-exchange-box .ts-points {
    font-size: 28px;
    font-weight: bold;
    color: #ffd700;
}
.ts-exchange-box .ts-points-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 12px;
}
.ts-exchange-box .ts-cost-info {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
}

/* ---------- 空状态 ---------- */
.ts-empty {
    text-align: center;
    padding: 30px 10px;
    color: rgba(255,255,255,0.3);
    font-size: 14px;
}

/* ---------- 分隔线 ---------- */
.ts-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 14px 0;
}

/* ---------- 天赋总览投票栏 ---------- */
.ts-summary-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
}

.ts-vote-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 6px 10px 18px;
    margin-left: 8px;
    min-width: 90px;
}

.ts-vote-bar-info {
    text-align: center;
    max-width: 140px;
}

.ts-vote-bar-name {
    font-size: 13px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 4px;
    line-height: 1.3;
    word-break: break-all;
}

.ts-vote-bar-dist {
    font-size: 11px;
    font-weight: normal;
    color: rgba(255,255,255,0.6);
    margin-left: 4px;
}

.ts-vote-bar-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ts-vote-bar-meta {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
}

.ts-vote-bar-actions {
    display: flex;
    gap: 10px;
}

.ts-vote-big {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
    cursor: pointer;
    transition: all 0.25s;
    min-width: 64px;
}

.ts-vote-big:hover {
    background: rgba(255,255,255,0.1);
    transform: scale(1.08);
}

.ts-vote-big-icon {
    font-size: 28px;
    line-height: 1;
}

.ts-vote-big-count {
    font-size: 14px;
    font-weight: bold;
    color: rgba(255,255,255,0.8);
}

.ts-vote-big.voted-up {
    background: rgba(82,196,26,0.18);
    border-color: #52c41a;
}

.ts-vote-big.voted-up .ts-vote-big-count {
    color: #52c41a;
}

.ts-vote-big.voted-down {
    background: rgba(255,77,79,0.18);
    border-color: #ff4d4f;
}

.ts-vote-big.voted-down .ts-vote-big-count {
    color: #ff4d4f;
}

.ts-vote-bar-own {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    padding: 10px 0;
}

/* ---------- 天赋树分布标签 ---------- */
.ts-card-dist {
    font-size: 12px;
    font-weight: normal;
    color: rgba(255,255,255,0.55);
    margin-left: 6px;
}

/* ---------- 右侧公开天赋侧边栏 ---------- */
.ts-sidebar {
    position: fixed;
    right: 68px;
    top: 50%;
    transform: translateY(-50%);
    width: 240px;
    max-height: 80vh;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    z-index: 100000;
    box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.ts-sidebar-header {
    padding: 10px 14px;
    font-size: 14px;
    font-weight: bold;
    color: #ffd700;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    flex-shrink: 0;
}

.ts-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.ts-sidebar-list::-webkit-scrollbar {
    width: 4px;
}

.ts-sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
}

.ts-sidebar-empty {
    text-align: center;
    color: rgba(255,255,255,0.3);
    padding: 20px 10px;
    font-size: 13px;
}

.ts-sidebar-item {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
    margin-bottom: 4px;
}

.ts-sidebar-item:hover {
    background: rgba(255,255,255,0.08);
}

.ts-sidebar-item-name {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ts-sidebar-item-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

.ts-sidebar-item-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.35);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 绑定微信弹窗 ---------- */
.ts-bind-panel {
    width: 360px;
    max-width: 90vw;
}

.ts-bind-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
}

.ts-bind-input-wrap {
    margin-bottom: 20px;
}

.ts-bind-input {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 12px;
    text-align: center;
    color: #FFD700;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(255,215,0,0.3);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s;
}

.ts-bind-input:focus {
    border-color: rgba(255,215,0,0.7);
}

.ts-bind-input::placeholder {
    font-size: 14px;
    font-weight: normal;
    font-family: inherit;
    letter-spacing: normal;
    color: rgba(255,255,255,0.25);
}

.ts-bind-actions {
    display: flex;
    gap: 12px;
}

.ts-bind-actions .ts-btn {
    flex: 1;
    padding: 12px 0;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.ts-bind-actions .ts-btn-cancel {
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.6);
}

.ts-bind-actions .ts-btn-cancel:hover {
    background: rgba(255,255,255,0.12);
}

.ts-bind-actions .ts-btn-primary {
    background: linear-gradient(135deg, #45ACF6, #3590d0);
    color: #fff;
}

.ts-bind-actions .ts-btn-primary:hover {
    background: linear-gradient(135deg, #3590d0, #2a7ab8);
}

.ts-bind-actions .ts-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
