/* ============================================================
   Inner Lab 全站服务样式 v2.0
   等级徽章、暗色主题适配
   ============================================================ */

/* ===== 等级/XP 徽章 ===== */
.level-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent-glow, rgba(99,102,241,0.15)), rgba(168,85,247,0.1));
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 999px;
    padding: 4px 14px 4px 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent, #6366f1);
    white-space: nowrap;
}
.level-badge .level-icon {
    font-size: 16px;
}
.level-badge .level-num {
    font-size: 15px;
    font-weight: 700;
}
.level-badge .xp-text {
    font-weight: 400;
    font-size: 12px;
    opacity: 0.75;
    margin-left: 2px;
}
.level-badge .xp-text strong {
    font-weight: 700;
    opacity: 1;
}

/* 深色主题兼容 */
[data-theme="dark"] .level-badge {
    background: linear-gradient(135deg, rgba(129,140,248,0.2), rgba(192,132,252,0.12));
    border-color: rgba(129,140,248,0.3);
    color: #c7d2fe;
}

/* ===== 暗色主题 hero-section 保持深色渐变 ===== */
[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #0c0a2e 0%, #1e1b4b 50%, #2e297a 100%);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .level-badge {
        font-size: 11px;
        padding: 2px 10px 2px 6px;
    }
    .level-badge .level-icon {
        font-size: 13px;
    }
    .level-badge .level-num {
        font-size: 13px;
    }
}

/* ===== Avatar Frame System ===== */
.avatar-frame {
    position: relative;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}
.frame-border {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}
.frame-emoji {
    position: relative;
    z-index: 1;
}
.frame-mythic .frame-border {
    animation: frameGlow 2s ease-in-out infinite;
}
.frame-legendary .frame-border {
    animation: frameGlow 3s ease-in-out infinite;
}
@keyframes frameGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}
@keyframes framePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
}
@keyframes frameFire {
    0%, 100% { box-shadow: 0 0 20px rgba(249, 115, 22, 0.5); }
    50% { box-shadow: 0 0 30px rgba(249, 115, 22, 0.7), 0 0 50px rgba(239, 68, 68, 0.3); }
}
@keyframes frameLegendary {
    0%, 100% { box-shadow: 0 0 30px rgba(251, 191, 36, 0.7); }
    50% { box-shadow: 0 0 40px rgba(251, 191, 36, 0.9), 0 0 60px rgba(239, 68, 68, 0.4); }
}
@keyframes frameMythic {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}
.frame-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}
.frame-option {
    text-align: center;
    padding: 12px 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}
.frame-option:hover {
    background: var(--bg-secondary);
}
.frame-option.active {
    border-color: var(--accent);
    background: var(--accent-subtle);
}
.frame-option .frame-name {
    font-size: 12px;
    margin-top: 8px;
    font-weight: 500;
}
.frame-option .frame-rarity {
    font-size: 10px;
    margin-top: 2px;
}
.frame-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
}
.frame-item {
    text-align: center;
    padding: 16px 12px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
}
.frame-item.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}
.frame-item .frame-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}
.frame-locked {
    font-size: 32px;
    opacity: 0.3;
}

/* ===== Season Quest System ===== */
.daily-quests, .season-challenges {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.quest-card {
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    transition: all 0.2s;
}
.quest-card.completed {
    opacity: 0.7;
    border-color: #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.05), transparent);
}
.quest-card.compact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}
.quest-card.compact .quest-icon {
    font-size: 18px;
}
.quest-card.compact .quest-name {
    flex: 1;
    font-size: 13px;
    font-weight: 500;
}
.quest-card.compact .quest-progress {
    font-size: 12px;
    color: var(--text-muted);
}
.quest-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.quest-header .quest-icon {
    font-size: 20px;
}
.quest-header .quest-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}
.quest-header .quest-status {
    font-size: 14px;
}
.quest-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.quest-progress-bar {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}
.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.quest-card.completed .quest-progress-fill {
    background: #22c55e;
}
.quest-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}
.quest-reward {
    color: #f59e0b;
    font-weight: 600;
}