/* ============================================================================
 * V15 · Aurora Noir — Components (reusable UI)
 * ==========================================================================*/

/* ---- Glass card ---- */
.v15-card {
    position: relative;
    background: var(--v15-surface);
    border: 1px solid var(--v15-line);
    border-radius: var(--v15-r-lg);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
            backdrop-filter: blur(20px) saturate(140%);
    box-shadow: var(--v15-shadow);
    overflow: hidden;
}
.v15-card.pad { padding: var(--v15-s5); }
/* top inner light */
.v15-card.lit::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}
/* gradient-border (aurora outline) via mask */
.v15-card.edge::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px;
    background: var(--v15-aurora);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    opacity: 0.5; pointer-events: none;
    transition: opacity var(--v15-t-mid);
}
.v15-card.edge:hover::after { opacity: 1; }
/* interactive lift */
.v15-card.tap { transition: transform var(--v15-t-fast) var(--v15-ease), border-color var(--v15-t-mid), box-shadow var(--v15-t-mid); cursor: pointer; }
.v15-card.tap:hover { transform: translateY(-2px); border-color: var(--v15-line-2); box-shadow: var(--v15-shadow-2); }
.v15-card.tap:active { transform: scale(0.99); }

/* ---- Buttons ---- */
.v15-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--v15-s2);
    height: 44px; padding: 0 var(--v15-s5);
    border-radius: var(--v15-r-md);
    font-size: var(--v15-fs-md); font-weight: 800; letter-spacing: 0.2px;
    color: var(--v15-txt);
    background: var(--v15-surface-2);
    border: 1px solid var(--v15-line);
    position: relative; overflow: hidden;
    transition: transform var(--v15-t-fast) var(--v15-ease), filter var(--v15-t-fast), box-shadow var(--v15-t-mid), background var(--v15-t-fast);
    -webkit-user-select: none; user-select: none;
}
.v15-btn:active { transform: scale(0.97); }
.v15-btn.block { width: 100%; }
.v15-btn.lg { height: 52px; font-size: var(--v15-fs-lg); border-radius: var(--v15-r-lg); }
.v15-btn.sm { height: 34px; padding: 0 var(--v15-s4); font-size: var(--v15-fs-sm); border-radius: var(--v15-r-sm); }
.v15-btn i.layui-icon { font-size: 16px; }

/* primary: aurora gradient + glow */
.v15-btn.primary {
    background: var(--v15-aurora);
    color: #050507;
    border-color: transparent;
    box-shadow: 0 8px 28px rgba(var(--v15-a2-rgb),0.45);
}
.v15-btn.primary:hover { filter: brightness(1.08); box-shadow: 0 12px 36px rgba(var(--v15-a2-rgb),0.6); }
/* shine sweep */
.v15-btn.primary::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
    transform: translateX(-120%) skewX(-18deg);
    transition: transform var(--v15-t-slow) var(--v15-ease);
}
.v15-btn.primary:hover::before { transform: translateX(220%) skewX(-18deg); }

/* outline: animated aurora gradient border */
.v15-btn.outline {
    background: rgba(255,255,255,0.02);
    color: var(--v15-txt);
    border-color: transparent;
}
.v15-btn.outline::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px;
    background: var(--v15-aurora);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    animation: v15-border-flow 4s linear infinite;
}
.v15-btn.ghost { background: transparent; border-color: var(--v15-line); }
.v15-btn:disabled, .v15-btn.disabled { opacity: 0.5; pointer-events: none; }

/* ---- Pills / badges / chips ---- */
.v15-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: var(--v15-r-pill);
    font-size: var(--v15-fs-xs); font-weight: 800; letter-spacing: 0.4px;
    background: var(--v15-surface-2); color: var(--v15-txt-2);
    border: 1px solid var(--v15-line);
}
.v15-chip.aurora { background: var(--v15-aurora-soft); color: var(--v15-txt); border-color: rgba(var(--v15-a2-rgb),0.4); }
.v15-chip.cyan   { color: var(--v15-a1); border-color: rgba(var(--v15-a1-rgb),0.4); background: rgba(var(--v15-a1-rgb),0.10); }
.v15-chip.gold   { color: var(--v15-gold); border-color: rgba(232,195,107,0.4); background: rgba(232,195,107,0.10); }
.v15-chip.up     { color: var(--v15-up); border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.10); }
.v15-chip.down   { color: var(--v15-down); border-color: rgba(251,113,133,0.4); background: rgba(251,113,133,0.10); }
.v15-chip .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }

/* ---- Inputs ---- */
.v15-field { margin-bottom: var(--v15-s4); }
.v15-label {
    font-size: var(--v15-fs-xs); color: var(--v15-txt-3);
    font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
    margin-bottom: var(--v15-s2);
    display: flex; align-items: center; gap: 6px;
}
.v15-input {
    display: flex; align-items: center; gap: var(--v15-s3);
    height: 52px; padding: 0 var(--v15-s4);
    background: var(--v15-surface);
    border: 1px solid var(--v15-line);
    border-radius: var(--v15-r-md);
    transition: border-color var(--v15-t-fast), box-shadow var(--v15-t-mid), background var(--v15-t-fast);
}
.v15-input:focus-within {
    border-color: rgba(var(--v15-a1-rgb),0.6);
    box-shadow: 0 0 0 4px rgba(var(--v15-a1-rgb),0.12);
    background: var(--v15-surface-2);
}
.v15-input .pre { color: var(--v15-txt-3); flex-shrink: 0; display: inline-flex; }
.v15-input .pre i.layui-icon { font-size: 17px; }
.v15-input:focus-within .pre { color: var(--v15-a1); }
.v15-input .prefix { color: var(--v15-a1); font-weight: 800; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.v15-input input, .v15-input select, .v15-input textarea {
    flex: 1; min-width: 0;
    font-size: var(--v15-fs-lg); font-weight: 600; color: var(--v15-txt);
    background: transparent;
    font-variant-numeric: tabular-nums;
}
.v15-input input::placeholder, .v15-input textarea::placeholder { color: var(--v15-txt-4); font-weight: 400; }
.v15-input select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.v15-input .suffix { flex-shrink: 0; color: var(--v15-txt-3); display: inline-flex; align-items: center; }
.v15-input .eye { cursor: pointer; transition: color var(--v15-t-fast), transform var(--v15-t-fast) var(--v15-ease); }
.v15-input .eye:hover { color: var(--v15-a1); }
.v15-input .eye:active { transform: scale(0.88); }
.v15-input.textarea { height: auto; align-items: stretch; padding: var(--v15-s4); }
.v15-input.textarea textarea { resize: vertical; min-height: 96px; line-height: 1.6; }

/* segmented control / tabs */
.v15-seg {
    display: inline-flex; padding: 4px; gap: 2px;
    background: var(--v15-surface); border: 1px solid var(--v15-line);
    border-radius: var(--v15-r-md);
}
.v15-seg.block { display: flex; }
.v15-seg button {
    flex: 1; height: 36px; padding: 0 var(--v15-s4);
    border-radius: var(--v15-r-sm);
    font-size: var(--v15-fs-sm); font-weight: 800; letter-spacing: 0.3px;
    color: var(--v15-txt-3);
    transition: color var(--v15-t-mid) var(--v15-ease), background var(--v15-t-mid);
    white-space: nowrap;
}
.v15-seg button.active {
    color: #050507;
    background: var(--v15-aurora);
    box-shadow: 0 4px 14px rgba(var(--v15-a2-rgb),0.4);
}

/* scroll tabs (chips) */
.v15-tabs { position: relative; z-index: 1; display: flex; gap: var(--v15-s2); overflow-x: auto; padding: 0 var(--v15-s4); scrollbar-width: none; }
.v15-tabs::-webkit-scrollbar { display: none; }
.v15-tabs .tab {
    flex-shrink: 0; padding: 8px 16px; border-radius: var(--v15-r-pill);
    font-size: var(--v15-fs-sm); font-weight: 700; color: var(--v15-txt-2);
    background: var(--v15-surface); border: 1px solid var(--v15-line);
    transition: all var(--v15-t-mid) var(--v15-ease);
}
.v15-tabs .tab.active { color: #050507; background: var(--v15-aurora); border-color: transparent; box-shadow: 0 4px 14px rgba(var(--v15-a2-rgb),0.4); }
.v15-tabs .tab .count { margin-left: 5px; opacity: 0.7; font-variant-numeric: tabular-nums; }

/* ---- Avatar ---- */
.v15-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
    font-weight: 800; color: #050507;
    background: var(--v15-aurora);
    position: relative;
}
.v15-avatar img { width: 100%; height: 100%; object-fit: cover; }
.v15-avatar.ring { padding: 2px; background: var(--v15-aurora); }
.v15-avatar.ring > * { border-radius: 50%; background: var(--v15-bg-2); width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--v15-txt); }

/* ---- List row ---- */
.v15-row {
    display: flex; align-items: center; gap: var(--v15-s3);
    padding: var(--v15-s4);
    transition: background var(--v15-t-fast);
}
.v15-row + .v15-row { border-top: 1px solid var(--v15-line); }
.v15-row:active { background: var(--v15-surface); }
.v15-row .v15-row-ic {
    width: 40px; height: 40px; border-radius: var(--v15-r-md); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--v15-surface-2); color: var(--v15-a1);
    border: 1px solid var(--v15-line);
    transition: transform var(--v15-t-mid) var(--v15-ease);
}
.v15-row:hover .v15-row-ic { transform: scale(1.06); }
.v15-row .v15-row-ic i.layui-icon { font-size: 19px; }
.v15-row .v15-row-body { flex: 1; min-width: 0; }
.v15-row .v15-row-title { display: block; font-size: var(--v15-fs-md); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v15-row .v15-row-sub { display: block; font-size: var(--v15-fs-sm); color: var(--v15-txt-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v15-row .v15-row-arrow { color: var(--v15-txt-4); flex-shrink: 0; transition: transform var(--v15-t-fast) var(--v15-ease), color var(--v15-t-fast); }
.v15-row:hover .v15-row-arrow { color: var(--v15-a1); transform: translateX(3px); }
.v15-row .v15-row-arrow i.layui-icon { font-size: 16px; }

/* ---- Skeleton (shimmer) ---- */
.v15-skel {
    background: linear-gradient(100deg, var(--v15-surface) 30%, var(--v15-surface-3) 50%, var(--v15-surface) 70%);
    background-size: 200% 100%;
    animation: v15-shimmer 1.4s linear infinite;
    border-radius: var(--v15-r-sm);
}

/* ---- Bottom sheet / modal ---- */
.v15-mask {
    position: fixed; inset: 0; z-index: var(--v15-z-sheet);
    background: rgba(0,0,0,0.6);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; transition: opacity var(--v15-t-mid) var(--v15-ease);
    display: flex; align-items: flex-end; justify-content: center;
}
.v15-mask.show { opacity: 1; }
@media (min-width: 520px) { .v15-mask { align-items: center; } }
.v15-sheet {
    width: 100%; max-width: var(--v15-maxw);
    background: var(--v15-bg-2);
    border: 1px solid var(--v15-line);
    border-radius: var(--v15-r-xl) var(--v15-r-xl) 0 0;
    box-shadow: var(--v15-shadow-2);
    transform: translateY(100%);
    transition: transform var(--v15-t-mid) var(--v15-ease);
    max-height: 88vh; overflow-y: auto;
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    padding: var(--v15-s5) var(--v15-s5) calc(var(--v15-s5) + var(--v15-safe-b));
}
@media (min-width: 520px) { .v15-sheet { border-radius: var(--v15-r-xl); transform: scale(0.92); opacity: 0; transition: transform var(--v15-t-mid) var(--v15-ease), opacity var(--v15-t-mid); } }
.v15-mask.show .v15-sheet { transform: translateY(0); }
@media (min-width: 520px) { .v15-mask.show .v15-sheet { transform: scale(1); opacity: 1; } }
.v15-sheet .v15-sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--v15-line-2); margin: 0 auto var(--v15-s4); }

/* ---- Empty state ---- */
.v15-empty { padding: 56px 24px; text-align: center; color: var(--v15-txt-3); }
.v15-empty .ic {
    width: 64px; height: 64px; border-radius: var(--v15-r-lg);
    display: flex; align-items: center; justify-content: center; margin: 0 auto var(--v15-s3);
    background: var(--v15-aurora-soft); color: var(--v15-a2);
    border: 1px solid rgba(var(--v15-a2-rgb),0.3);
}
.v15-empty .ic i.layui-icon { font-size: 28px; }
.v15-empty .t { font-size: var(--v15-fs-md); font-weight: 700; color: var(--v15-txt-2); }
.v15-empty .s { font-size: var(--v15-fs-sm); margin-top: 4px; }

/* ---- Toast (used by api.js) ---- */
.v15-toast-wrap { position: fixed; top: calc(16px + var(--v15-safe-t)); left: 0; right: 0; z-index: var(--v15-z-toast); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.v15-toast {
    max-width: 84%; padding: 11px 18px; border-radius: var(--v15-r-pill);
    background: rgba(10,10,13,0.92); color: var(--v15-txt);
    border: 1px solid var(--v15-line-2);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    box-shadow: var(--v15-shadow);
    font-size: var(--v15-fs-sm); font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    transform: translateY(-16px); opacity: 0;
    transition: transform var(--v15-t-mid) var(--v15-ease), opacity var(--v15-t-mid);
}
.v15-toast.show { transform: translateY(0); opacity: 1; }
.v15-toast i.layui-icon { font-size: 16px; }
.v15-toast.ok i.layui-icon { color: var(--v15-up); }
.v15-toast.err i.layui-icon { color: var(--v15-down); }

/* ---- Floating service FAB (bottom-right; nav radial FAB owns bottom-left) ---- */
.v15-fab-service {
    position: fixed; right: 16px; left: auto;
    bottom: calc(18px + var(--v15-safe-b));
    z-index: var(--v15-z-fab);
    width: 50px; height: 50px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #050507;
    background: rgba(12,12,16,0.94);
    border: 1px solid var(--v15-line-2);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.55);
    transition: transform var(--v15-t-fast) var(--v15-ease), border-color var(--v15-t-fast);
}
.v15-fab-service:active { transform: scale(0.9); }
.v15-fab-service:hover { border-color: rgba(var(--v15-a1-rgb),0.6); }
.v15-fab-service i.layui-icon { font-size: 22px; color: var(--v15-a1); }
.v15-fab-service .ring { position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(var(--v15-a1-rgb),0.45); animation: v15-pulse 2.6s ease-in-out infinite; pointer-events: none; }
@media (min-width: 520px) { .v15-fab-service { right: calc(50vw - 240px + 16px); left: auto; } }

/* ---- Notice / rules box (reused across many pages) ---- */
.v15-notice { margin: var(--v15-s5) var(--v15-s4) 0; padding: var(--v15-s4); background: rgba(var(--v15-a2-rgb),0.06); border: 1px solid rgba(var(--v15-a2-rgb),0.2); border-radius: var(--v15-r-md); }
.v15-notice-head { display: flex; align-items: center; gap: 6px; font-size: var(--v15-fs-sm); font-weight: 800; color: var(--v15-a2); margin-bottom: var(--v15-s2); }
.v15-notice-head i.layui-icon { font-size: 15px; }
.v15-notice ol, .v15-notice ul { padding-left: 18px; }
.v15-notice li { font-size: var(--v15-fs-xs); color: var(--v15-txt-3); line-height: 1.7; }
.v15-notice li b { color: var(--v15-txt-2); }

/* ---- Copy-link strip (invite/promotion link) ---- */
.v15-linkbar { display: flex; align-items: center; gap: var(--v15-s3); margin: var(--v15-s4) var(--v15-s4) 0; padding: var(--v15-s3) var(--v15-s4); background: var(--v15-surface); border: 1px solid var(--v15-line); border-radius: var(--v15-r-md); }
.v15-linkbar .ic { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--v15-a1); background: rgba(var(--v15-a1-rgb),0.12); border: 1px solid rgba(var(--v15-a1-rgb),0.3); }
.v15-linkbar .ic i.layui-icon { font-size: 18px; }
.v15-linkbar .body { flex: 1; min-width: 0; }
.v15-linkbar .lab { font-size: 9px; color: var(--v15-txt-3); font-family: var(--v15-mono); letter-spacing: 0.5px; }
.v15-linkbar .v { font-size: var(--v15-fs-xs); color: var(--v15-txt-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v15-linkbar .btn { flex-shrink: 0; padding: 8px 14px; border-radius: var(--v15-r-pill); font-size: var(--v15-fs-xs); font-weight: 800; color: #050507; background: var(--v15-aurora); border: 0; transition: transform var(--v15-t-fast) var(--v15-ease), filter var(--v15-t-fast); }
.v15-linkbar .btn:active { transform: scale(0.92); }
.v15-linkbar .btn:hover { filter: brightness(1.08); }

/* ---- Ripple ---- */
.v15-ripple { position: relative; overflow: hidden; }
.v15-ripple > .v15-rp {
    position: absolute; border-radius: 50%; transform: scale(0);
    background: rgba(255,255,255,0.25); pointer-events: none;
    animation: v15-ripple 0.6s var(--v15-ease);
}
