﻿/* =============================================================================
   DASHBOARD STYLES
   ============================================================================= */

/* =============================================================================
   LOG LIST & ACTIVITY FEED
   ============================================================================= */

.log-list { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.log-item { padding: 10px 0; border-bottom: 1px solid #222; display: flex; align-items: center; gap: 12px; }
.log-item:last-child { border-bottom: none; }
.log-content { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: 1; text-align: center; }
.log-text { font-size: 0.9rem; color: #ddd; line-height: 1.4; text-align: center; }
.log-text-highlight { color: var(--gold); font-weight: 700; text-shadow: 0 0 8px rgba(255,215,0,0.2); }
.log-text-levelup { color: #4fc3f7; font-weight: 600; }
.log-text-levelup .log-skill-name { color: #fff; font-weight: 700; }
.log-text-quest { color: #a855f7; font-weight: 600; }
.log-text-quest .log-quest-name { color: #c084fc; font-weight: 700; }
.log-text-boss { color: #ef4444; font-weight: 600; }
.log-text-xp { color: #22c55e; font-weight: 600; }
.log-text-join { color: #4caf50; font-weight: 600; }
.log-text-leave { color: #f44336; font-weight: 600; }
.log-text-rank { color: #ff9800; font-weight: 600; }
.log-clan-name { color: #4fc3f7; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color 0.2s; }
.log-clan-name:hover { text-decoration-color: #4fc3f7; }
.log-rank { color: #ffc107; font-weight: 700; }
.log-rank-promoted { color: #4caf50; }
.log-rank-demoted { color: #f44336; }
.clan-history-icon { width: 28px; height: 28px; background: transparent; border: none; padding: 0; }
.log-level-badge { background: linear-gradient(135deg, #2196f3, #1976d2); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 2px 12px; border-radius: 4px; white-space: nowrap; display: inline-block; }
.log-levelup-container { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.log-levelup-container .log-text-levelup { font-size: 0.9rem; }
.log-levelup-container .log-skill-name { color: #fff; font-weight: 700; }
.log-levelup-wrapper { flex: 1; display: flex; justify-content: center; }
.log-item > .log-date { font-size: 0.7rem; color: #666; white-space: nowrap; flex-shrink: 0; }
.log-placeholder { color: #555; font-style: italic; text-align: center; padding: 20px 0; font-size: 0.9rem; }

/* =============================================================================
   HIGHLIGHTS & CAPE GOALS
   ============================================================================= */

.highlights-container { display: flex; flex-direction: column; gap: 12px; }
.highlight-card { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 8px; padding: 15px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.highlight-label { font-size: 0.7rem; color: #888; text-transform: uppercase; font-weight: 700; margin-bottom: 5px; }
.highlight-content { font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.highlight-sub { font-size: 0.75rem; color: var(--accent); }
.cape-goals-wrapper { display: flex; flex-direction: column; gap: 12px; animation: fadeInUp 0.4s ease-out; }
.cape-progress-card { display: flex; flex-direction: column; background: #111; border: 1px solid #333; border-radius: 8px; padding: 12px; text-decoration: none; transition: 0.2s; cursor: pointer; }
.cape-progress-card:hover { background: #1a1a1a; border-color: #555; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.rtm-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: #fff; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.rtm-pct { color: #888; font-feature-settings: "tnum"; }
.rtm-progress-track { width: 100%; height: 6px; background: #000; border-radius: 3px; overflow: hidden; border: 1px solid #222; margin-bottom: 6px; }
.rtm-progress-fill { height: 100%; background: #4fc3f7; width: 0%; transition: width 1s ease-out; box-shadow: 0 0 8px rgba(79,195,247,0.4); }
.rtm-sub-text { font-size: 0.65rem; color: #666; font-style: italic; }

/* =============================================================================
   SKILLS GRID & CARDS
   ============================================================================= */

.skills-grid { 
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
    gap: 8px; 
    padding: 12px; 
    justify-items: center;
    align-content: flex-start; 
    flex: 1; 
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}
.skills-grid .skill-card-detailed {
    width: 100%;
    max-width: 130px;
}
.skill-card-detailed { 
    background: #1a1a1a; 
    border: 1px solid #2a2a2a; 
    padding: 10px; 
    border-radius: 8px; 
    display: flex; 
    flex-direction: column; 
    justify-content: flex-start; 
    transition: 0.2s; 
    min-height: 105px; 
    position: relative;
    box-sizing: border-box;
    gap: 4px;
}
.skill-card-detailed:hover { background: #222; border-color: #444; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
.skill-card-detailed.maxed { border-color: var(--gold-dim); background: linear-gradient(135deg,#1a1a1a 0%,#252210 100%); box-shadow: 0 0 15px rgba(255,215,0,0.1); }
.skill-card-detailed.maxed:hover { border-color: var(--gold); box-shadow: 0 0 20px rgba(255,215,0,0.25); background: #2a2a2a; }
.skill-card-detailed.maxed .skill-lvl { color: var(--gold); text-shadow: 0 0 10px rgba(255,215,0,0.4); }
.skill-card-detailed.maxed .skill-progress-fill { background: var(--gold); box-shadow: 0 0 10px rgba(255,215,0,0.5); }
.skill-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2px; flex-shrink: 0; }
.skill-values { text-align: right; }
.skill-lvl { font-size: 1.2rem; font-weight: 700; color: #fff; line-height: 1; }
.skill-lvl.virtual { color: #bb86fc; text-shadow: 0 0 10px rgba(187,134,252,0.3); }
.skill-rank { font-size: 0.68rem; color: #666; margin-top: 2px; }
.skill-progress-track { width: 100%; height: 4px; background: #000; border-radius: 4px; margin-bottom: 2px; overflow: hidden; flex-shrink: 0; }
.skill-progress-fill { height: 100%; background: var(--accent); border-radius: 4px; }
.skill-icon-lg { width: 24px; height: 24px; flex-shrink: 0; }
/* Hide inline tooltip - using JS popup instead */
.skill-tooltip {
    display: none !important;
}
.skill-card-detailed .skill-card-bot { display: flex; flex-direction: column; gap: 1px; margin-top: auto; flex-shrink: 0; }
.skill-card-detailed .skill-xp-text { font-size: 0.72rem; color: #aaa; white-space: nowrap; line-height: 1.2; }
.skill-card-detailed .skill-next-text { color: #888; font-size: 0.65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }

/* =============================================================================
   SKILL POPUP TOOLTIP
   ============================================================================= */

/* Floating skill popup tooltip - follows mouse diagonally to the right */
.skill-popup-tooltip {
    position: fixed;
    display: none;
    background: rgba(10, 10, 15, 0.97);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 12px 16px;
    flex-direction: column;
    gap: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.7), 0 0 20px rgba(102, 126, 234, 0.15);
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
    animation: tooltipFadeIn 0.15s ease;
}
.skill-popup-tooltip.visible {
    display: flex;
}
.skill-popup-tooltip .st-name {
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
    border-bottom: 1px solid #333;
    padding-bottom: 6px;
    margin-bottom: 2px;
}
.skill-popup-tooltip .st-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-size: 0.9rem;
    color: #aaa;
}
.skill-popup-tooltip .st-val {
    color: #fff;
    font-weight: 700;
}
@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================================================
   CLAN TABLE
   ============================================================================= */

.clan-table-wrapper { overflow-x: auto; }
.clan-table { width: 100%; border-collapse: collapse; min-width: 800px; table-layout: fixed; }
.clan-table th { 
    text-align: left; 
    padding: 10px 8px; 
    color: #666; 
    font-size: 0.75rem; 
    border-bottom: 1px solid #333; 
    text-transform: uppercase;
    position: relative;
    user-select: none;
    border-right: 1px solid #2a2a2a;
}
.clan-table th:last-child { border-right: none; }
.clan-table th.xp-col { text-align: center; color: var(--green); }
.clan-table td { 
    padding: 10px 8px; 
    color: #ccc; 
    border-bottom: 1px solid #222; 
    font-size: 0.85rem;
    border-right: 1px solid #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.clan-table td:last-child { border-right: none; }
.clan-table tr { cursor: pointer; transition: 0.2s; }
.clan-table tr:hover { background: rgba(255,255,255,0.05); }
.clan-table tr:last-child td { border-bottom: none; }

/* =============================================================================
   CLAN TABLE DRAG & RESIZE
   ============================================================================= */

/* Draggable column headers */
.clan-table th.draggable {
    cursor: grab;
}
.clan-table th.draggable:active {
    cursor: grabbing;
}
.clan-table th.dragging {
    opacity: 0.5;
    background: rgba(255, 200, 87, 0.1);
}
.clan-table th.drag-over {
    background: rgba(255, 200, 87, 0.2);
    border-left: 2px solid var(--accent);
}

/* Column resize handle */
.col-resize-handle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.2s;
    z-index: 10;
}
.col-resize-handle:hover,
.col-resize-handle.resizing {
    background: var(--accent);
}

/* =============================================================================
   TABLE CONFIG BAR
   ============================================================================= */

.table-config-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    margin: 0 12px 8px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
    font-size: 0.68rem;
}
.config-hint {
    color: #555;
}
.reset-columns-btn {
    background: transparent;
    border: 1px solid #333;
    color: #666;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: 0.2s;
}
.reset-columns-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.xp-gain-cell { text-align: center; font-size: 0.8rem; font-weight: 600; }
.loading-xp { color: #444; font-style: italic; }
.clan-info-line { font-size: 0.9rem; color: #aaa; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.03); padding: 2px 8px; border-radius: 4px; white-space: nowrap; }
.clan-link { color: var(--blue); text-decoration: none; font-weight: 600; cursor: pointer; transition: 0.2s; white-space: nowrap; }
.clan-link:hover { color: #fff; text-decoration: underline; }
.clan-rank { color: #666; font-size: 0.8rem; background: rgba(255,255,255,0.05); padding: 2px 6px; border-radius: 4px; text-transform: capitalize; }
.rank-loading { color: #555; font-style: italic; font-size: 0.75rem; }

/* =============================================================================
   CLAN PODIUMS
   ============================================================================= */

.clan-podiums-container { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 10px 0 30px; }
.podium-group { background: #111; border: 1px solid #2a2a2a; border-radius: 12px; padding: 15px; display: flex; flex-direction: column; }
.podium-header { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; font-size: 1rem; font-weight: 700; color: #888; text-transform: uppercase; padding-bottom: 10px; border-bottom: 1px solid #222; }
.podium-grid { display: flex; gap: 10px; justify-content: center; align-items: flex-end; flex: 1; }
.podium-card { flex: 1; display: flex; flex-direction: column; align-items: center; background: #1a1a1a; padding: 10px; border-radius: 8px; text-align: center; position: relative; border: 1px solid #333; transition: 0.2s; cursor: pointer; }
.podium-card.rank-1 { order: 2; border-color: #ffd700; background: linear-gradient(to bottom,#252210,#1a1a1a); height: 100%; min-height: 140px; }
.podium-card.rank-2 { order: 1; border-color: #c0c0c0; background: linear-gradient(to bottom,#1f1f1f,#1a1a1a); height: 90%; margin-top: 10px; }
.podium-card.rank-3 { order: 3; border-color: #cd7f32; background: linear-gradient(to bottom,#241c15,#1a1a1a); height: 85%; margin-top: 15px; }
.medal-icon { font-size: 1.5rem; margin-bottom: 5px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.podium-avatar { width: 40px; height: 40px; border-radius: 50%; margin-bottom: 8px; border: 2px solid transparent; }
.rank-1 .podium-avatar { border-color: #ffd700; width: 50px; height: 50px; }
.rank-2 .podium-avatar { border-color: #c0c0c0; }
.rank-3 .podium-avatar { border-color: #cd7f32; }
.podium-name { font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 4px; word-break: break-word; line-height: 1.1; }
.podium-val { font-size: 0.75rem; color: #bbb; font-variant-numeric: tabular-nums; }
.rank-1 .podium-val { color: #ffd700; font-weight: 600; }

/* =============================================================================
   CLAN CONTROLS & HEADER BANNER
   ============================================================================= */

.clan-controls { display: flex; gap: 15px; margin-bottom: 15px; }
#clan-filter-input { background: #111; border: 1px solid #333; padding: 8px 12px; color: #fff; border-radius: 6px; font-size: 0.9rem; width: 250px; transition: 0.2s; }
#clan-filter-input:focus { border-color: var(--accent); outline: none; }
.sortable-header { cursor: pointer; user-select: none; transition: 0.2s; }
.sortable-header:hover { color: #fff; }
.sort-icon { font-size: 0.7rem; margin-left: 4px; color: var(--accent); }

.clan-header-banner { background: linear-gradient(135deg,#1a1a1a 0%,#0f0f0f 100%); border-bottom: 1px solid #333; padding: 30px 20px; display: flex; flex-direction: column; align-items: center; gap: 25px; position: relative; overflow: hidden; width: 100%; }
.clan-name-title { font-size: 3.2rem; font-weight: 900; text-transform: uppercase; letter-spacing: 4px; margin: 0; text-align: center; background: linear-gradient(90deg,#bb86fc 0%,#4fc3f7 25%,#fff 50%,#4fc3f7 75%,#bb86fc 100%); background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: mythicPulse 4s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(79,195,247,0.6)) drop-shadow(0 0 20px rgba(187,134,252,0.4)); will-change: filter, background-position; }
.clan-stats-pills { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; width: 100%; }
.stat-pill-box { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 50px; padding: 10px 24px; display: flex; align-items: center; gap: 12px; transition: 0.2s; backdrop-filter: blur(5px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.stat-pill-box:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
.stat-pill-box.xp { border-left: 3px solid var(--purple); }
.stat-pill-box.members { border-left: 3px solid var(--blue); }
.stat-pill-box.avg { border-left: 3px solid var(--green); }
.stat-pill-box.kills { border-left: 3px solid var(--urgent-red); }
.pill-label { font-size: 0.7rem; color: #888; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.pill-val { font-size: 1.1rem; color: #fff; font-weight: 700; font-feature-settings: "tnum"; }

/* =============================================================================
   PANEL HEADERS
   ============================================================================= */

.panel-header { padding: 18px 20px; background: linear-gradient(180deg,#161616 0%,#111 100%); border-bottom: 1px solid #333; font-size: 0.85rem; font-weight: 800; color: #888; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 10px; flex-shrink: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.1); z-index: 5; border-radius: 12px 12px 0 0; }
.panel-header::before { content: ''; width: 4px; height: 14px; background: var(--accent); border-radius: 2px; display: block; }

/* =============================================================================
   ACHIEVEMENTS
   ============================================================================= */

.achievement-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 15px; }
.ach-item { background: #111; border: 1px solid #333; border-radius: 8px; padding: 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; transition: 0.3s; position: relative; overflow: hidden; }
.ach-item img { filter: grayscale(100%) contrast(0.8); opacity: 0.4; transition: 0.4s cubic-bezier(0.175,0.885,0.32,1.275); transform: scale(1); padding-bottom: 10px; }
.ach-item.unlocked { border-color: var(--accent); background: radial-gradient(circle at center,#222 0%,#111 100%); box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.ach-item.unlocked img { filter: none; opacity: 1; transform: scale(1.15); filter: drop-shadow(0 0 8px rgba(255,152,0,0.5)); }
.ach-label { position: absolute; bottom: 0; font-size: 0.55rem; font-weight: 700; color: #ccc; text-transform: uppercase; width: 100%; text-align: center; background: rgba(0,0,0,0.8); padding: 2px 0; border-radius: 0 0 6px 6px; letter-spacing: 0.5px; }
.ach-item.unlocked .ach-label { color: var(--accent); background: rgba(0,0,0,0.6); }

/* =============================================================================
   MODALS & AUTH
   ============================================================================= */

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 2000; display: flex; justify-content: center; align-items: center; animation: popIn 0.3s; }
.modal-content { background: var(--bg-card); border: 1px solid var(--border-color); width: 100%; max-width: 380px; padding: 25px; border-radius: 12px; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.modal-close { position: absolute; top: 10px; right: 15px; background: none; border: none; color: #666; font-size: 1.5rem; cursor: pointer; }
.modal-close:hover { color: #fff; }
.auth-tabs { display: flex; border-bottom: 1px solid #333; margin-bottom: 20px; }
.auth-tab { flex: 1; background: none; border: none; padding: 10px; color: #888; font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; transition: 0.2s; }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.input-group { margin-bottom: 15px; display: flex; flex-direction: column; gap: 5px; }
.input-group label { font-size: 0.8rem; color: #888; font-weight: 600; text-transform: uppercase; }
.input-group input { background: #111; border: 1px solid #333; padding: 10px; border-radius: 6px; color: #fff; outline: none; transition: 0.2s; }
.input-group input:focus { border-color: var(--accent); }
.submit-btn { width: 100%; background: var(--accent); color: #000; font-weight: 700; padding: 12px; border: none; border-radius: 6px; cursor: pointer; margin-top: 10px; transition: 0.2s; }
.submit-btn:hover { background: #ffb74d; transform: translateY(-1px); }
.error-text { color: var(--urgent-red); font-size: 0.85rem; margin-bottom: 10px; min-height: 1rem; text-align: center; }

/* =============================================================================
   LOGIN & USER BUTTONS
   ============================================================================= */

.login-btn { background: #222; border: 1px solid #333; color: #ddd; padding: 6px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; transition: 0.2s; }
.login-btn:hover { border-color: var(--accent); color: #fff; }
.user-btn { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); padding: 6px 12px; border: 1px solid transparent; border-radius: 6px; cursor: pointer; color: #ddd; font-weight: 600; transition: 0.2s; }
.user-btn:hover { background: rgba(255,255,255,0.1); border-color: #444; }
.user-menu-container { position: relative; }

/* =============================================================================
   USER PROFILE MODAL
   ============================================================================= */

.profile-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.profile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-dark);
    background: var(--bg-dropdown);
}

.profile-modal-title {
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--text-sub);
}

.profile-modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-header-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-dark);
    color: var(--text-main);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.profile-header-btn:hover {
    border-color: var(--border-light);
    background: rgba(255,255,255,0.08);
}

/* Override base modal close positioning for profile header */
.profile-modal-content .modal-close {
    position: static;
    top: auto;
    right: auto;
    font-size: 1.8rem;
    line-height: 1;
    padding: 0 6px;
}

.profile-banner {
    height: 160px;
    background: var(--bg-dropdown);
    border-bottom: 1px solid var(--border-dark);
    background-size: cover;
    background-position: center;
}

.profile-banner.has-image {
    background-color: var(--bg-dropdown);
}

.profile-top {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    padding: 0 18px 14px;
    margin-top: -44px;
}

.profile-avatar-wrap {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-full);
    border: 3px solid var(--bg-card);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    flex-shrink: 0;
}

.profile-avatar-img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    background: transparent;
}

.profile-identity {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.profile-name {
    font-size: 1.05rem;
    font-weight: 800;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-meta {
    color: var(--text-sub);
    font-size: 0.85rem;
}

.profile-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-display-name {
    font-weight: 800;
    color: var(--text-main);
}

.profile-meta-dim {
    color: var(--text-muted);
}

.profile-statusline {
    color: var(--text-main);
    font-weight: 800;
    margin-bottom: 6px;
    word-break: break-word;
}

.profile-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-sub);
    font-weight: 800;
    font-size: 0.75rem;
}

.profile-tabs {
    display: flex;
    gap: 8px;
    padding: 10px 18px;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    background: rgba(255,255,255,0.02);
}

.profile-tab-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dark);
    color: var(--text-main);
    padding: 8px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 800;
    font-size: 0.75rem;
    transition: var(--transition-fast);
}

.profile-tab-btn:hover {
    border-color: var(--border-light);
}

.profile-tab-btn.active {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.profile-body {
    padding: 14px 18px 18px;
    overflow: auto;
}

.profile-tab-panel {
    display: none;
}

.profile-tab-panel.active {
    display: block;
}

.profile-section {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 12px;
}

.profile-section-title {
    color: var(--text-sub);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.profile-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-bio {
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.profile-line {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.profile-k {
    color: var(--text-sub);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 0 0 auto;
}

.profile-v {
    color: var(--text-main);
    text-align: right;
    flex: 1 1 auto;
}

.profile-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-main);
    font-weight: 900;
    font-size: 0.75rem;
}

.profile-link {
    text-decoration: none;
    color: var(--accent);
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
    padding: 8px 10px;
    border-radius: var(--radius-full);
}

.profile-link:hover {
    color: var(--accent-hover);
    border-color: rgba(255,255,255,0.12);
}

.profile-link-muted {
    color: var(--text-sub);
    border-color: rgba(255,255,255,0.04);
}

.profile-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 900;
    font-size: 0.75rem;
}

.profile-status-pill.status-active {
    border-color: rgba(76,175,80,0.35);
}

.profile-status-pill.status-idle {
    border-color: rgba(255,152,0,0.35);
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.profile-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.profile-showcase-card {
    display: block;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
    padding: 12px;
    transition: var(--transition-fast);
    min-height: 76px;
}

.profile-showcase-card:hover {
    border-color: rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
}

.profile-showcase-title {
    font-weight: 900;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-showcase-url {
    color: var(--text-sub);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-showcase-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-showcase-edit-row {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 8px;
}

.profile-form-grid textarea.style-input {
    min-height: 110px;
    resize: vertical;
}

.profile-char {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 6px;
}

.profile-form-actions {
    margin-top: 12px;
}

.profile-privacy-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-privacy-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.profile-privacy-label {
    font-weight: 900;
    color: var(--text-main);
}

.profile-privacy-sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Reusable: makes names/avatars clickable without button chrome */
.profile-link-btn {
    background: none;
    border: none;
    padding: 2px 4px;
    margin: -2px -4px;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
    overflow: visible;
    border-radius: 4px;
}

.profile-link-btn:hover {
    filter: brightness(1.08);
}

/* =============================================================================
   PROFILE RESPONSIVE
   ============================================================================= */

@media (max-width: 700px) {
    .profile-form-grid {
        grid-template-columns: 1fr;
    }
    .profile-top {
        align-items: center;
        margin-top: -36px;
    }
    .profile-showcase-grid {
        grid-template-columns: 1fr;
    }
    .profile-showcase-edit-row {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   NEWS EVENTS CARD
   ============================================================================= */

#news-events-card { overflow: hidden; position: relative; }
#news-events-card .card-content { justify-content: flex-start; flex: 1; display: flex; flex-direction: column; }

.final-week-divider {
    color: rgba(255, 215, 0, 0.6);
    font-weight: 300;
}

.final-week-star {
    color: #ffd700;
    font-size: 0.7rem;
    animation: starTwinkle 1s ease-in-out infinite;
    text-shadow: 0 0 8px #ffd700;
}

.final-week-star:last-child {
    animation-delay: 0.5s;
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes bannerShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes textShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes bannerGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.1); }
}

@keyframes luckPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.9; transform: scale(1.02); }
}

@keyframes starTwinkle {
    0%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
    50% { opacity: 0.6; transform: scale(0.8) rotate(180deg); }
}

/* =============================================================================
   PVM / BOSS DASHBOARD
   ============================================================================= */

/* Summary stat cards — 2×2 grid */
/* ═══════════════════════════════════════════════════════════════════
   PVM TAB — Stat Strip
   ═══════════════════════════════════════════════════════════════════ */
.pvm-stat-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a1015 0%, #181818 100%);
    border: 1px solid #2a2020;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 10px;
    gap: 4px;
}
.pvm-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.pvm-stat-num {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    font-feature-settings: "tnum";
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}
.pvm-stat-lbl {
    font-size: 0.55rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.pvm-stat-sep {
    width: 1px;
    height: 24px;
    background: #333;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   PVM TAB — Sub-tabs (Boss Kills / Collection Log)
   ═══════════════════════════════════════════════════════════════════ */
.pvm-subtabs {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    background: #0e0e0e;
    border-radius: 8px;
    padding: 3px;
    border: 1px solid #2a2a2a;
}
.pvm-subtab {
    flex: 1;
    background: transparent;
    border: none;
    color: #666;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 7px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pvm-subtab:hover { color: #bbb; background: rgba(255,255,255,0.03); }
.pvm-subtab.active { color: #fff; background: #ef4444; }
.pvm-subtab-content { display: none; }
.pvm-subtab-content.active { display: block; }

/* ═══════════════════════════════════════════════════════════════════
   PVM TAB — Controls (Search + Sort)
   ═══════════════════════════════════════════════════════════════════ */
.pvm-controls {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    align-items: center;
}
.pvm-search {
    flex: 1;
    background: #0e0e0e;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 7px 10px;
    color: #ccc;
    font-size: 0.72rem;
    outline: none;
    transition: border-color 0.2s;
}
.pvm-search:focus { border-color: #ef4444; }
.pvm-search::placeholder { color: #444; }
.pvm-sort-btns { display: flex; gap: 3px; flex-shrink: 0; }
.pvm-sort-btn {
    background: #0e0e0e;
    border: 1px solid #2a2a2a;
    border-radius: 5px;
    color: #666;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.pvm-sort-btn:hover { color: #ccc; border-color: #444; }
.pvm-sort-btn.active { color: #fff; border-color: #ef4444; background: rgba(239,68,68,0.15); }

/* ═══════════════════════════════════════════════════════════════════
   PVM TAB — Boss Tile Grid
   ═══════════════════════════════════════════════════════════════════ */
.pvm-boss-list { display: flex; flex-direction: column; gap: 8px; }
.pvm-boss-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 6px;
}
.pvm-boss-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px 8px;
    background: #111;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-align: center;
}
.pvm-boss-tile:hover {
    border-color: #ef4444;
    background: #181215;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
}
.pvm-boss-tile.has-kills {
    border-color: #2a2020;
    background: linear-gradient(180deg, #1a1015 0%, #111 100%);
}
.pvm-boss-tile-img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: contain;
    background: rgba(0,0,0,0.4);
    border: 1px solid #222;
}
.pvm-boss-tile-kc {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.55rem;
    font-weight: 800;
    color: #ef4444;
    background: rgba(0,0,0,0.7);
    padding: 1px 5px;
    border-radius: 4px;
    font-feature-settings: "tnum";
    line-height: 1.4;
}
.pvm-boss-tile-name {
    font-size: 0.62rem;
    font-weight: 700;
    color: #ccc;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    max-width: 100%;
}
.pvm-boss-tile-drops {
    font-size: 0.52rem;
    color: #4ade80;
    font-weight: 600;
    font-feature-settings: "tnum";
}

/* ═══════════════════════════════════════════════════════════════════
   PVM TAB — Boss Drop Modal
   ═══════════════════════════════════════════════════════════════════ */
.pvm-boss-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(4px);
}
.pvm-boss-modal-overlay.visible { opacity: 1; }

.pvm-boss-modal-card {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: pvmModalIn 0.25s ease-out;
}
@keyframes pvmModalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.pvm-boss-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #333;
    background: rgba(255,255,255,0.04);
    color: #888;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
    line-height: 1;
}
.pvm-boss-modal-close:hover {
    background: rgba(239,68,68,0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.pvm-boss-modal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 18px 12px;
}
.pvm-boss-modal-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(0,0,0,0.4);
    border: 2px solid #2a2020;
    flex-shrink: 0;
}
.pvm-boss-modal-title {
    flex: 1;
    min-width: 0;
}
.pvm-boss-modal-title h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
}
.pvm-boss-wiki-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}
.pvm-boss-wiki-link:hover {
    color: var(--accent, #00d4ff);
    text-decoration: underline;
}
.pvm-boss-modal-stats {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}
.pvm-boss-modal-kc {
    font-size: 0.72rem;
    font-weight: 700;
    color: #ef4444;
    font-feature-settings: "tnum";
}
.pvm-boss-modal-date {
    font-size: 0.65rem;
    color: #555;
}

.pvm-boss-modal-progress {
    padding: 0 18px 12px;
}
.pvm-boss-modal-progress-bar {
    width: 100%;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}
.pvm-boss-modal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.pvm-boss-modal-progress-text {
    font-size: 0.62rem;
    color: #666;
}

.pvm-boss-modal-items {
    padding: 0 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pvm-modal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.15s;
    opacity: 0.4;
}
.pvm-modal-item.obtained {
    opacity: 1;
    background: rgba(34, 197, 94, 0.05);
}
.pvm-modal-item:hover {
    background: rgba(255,255,255,0.03);
    opacity: 1;
}
.pvm-modal-item-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid #1e1e1e;
    background: #0a0a0a;
}
.pvm-modal-item.obtained .pvm-modal-item-img {
    border-color: #22c55e;
}
.pvm-modal-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.pvm-modal-item-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pvm-modal-item.obtained .pvm-modal-item-name {
    color: #fff;
}
.pvm-modal-item-price {
    font-size: 0.58rem;
    color: #fbbf24;
    font-feature-settings: "tnum";
}
.pvm-modal-item-count {
    font-size: 0.72rem;
    font-weight: 700;
    color: #555;
    font-feature-settings: "tnum";
    flex-shrink: 0;
}
.pvm-modal-item.obtained .pvm-modal-item-count {
    color: #4ade80;
}
