.card { position: relative; padding: var(--space-5); border-radius: var(--radius-md); background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-panel); transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition); }
.card:hover { border-color: var(--border-strong); }
.card--lift:hover { transform: translateY(-4px); }
.card--tight { padding: var(--space-4); }
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.card__title { font-family: var(--font-display); font-size: 1.15rem; margin: 0; }
.card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); color: var(--muted); font-size: .8rem; align-items: center; }
.card__body { color: var(--text-soft); }
.card__foot { margin-top: var(--space-4); display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; }
.card__media { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-soft); }
.card--link { color: inherit; display: block; }
.card--link:hover { color: inherit; }

.stat { padding: var(--space-4); border-radius: var(--radius-md); background: var(--panel); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; }
.stat__value { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--accent); }
.stat__label { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat__icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(var(--accent-rgb), .12); color: var(--accent); margin-bottom: var(--space-2); }

.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, rgba(var(--accent-rgb), .3), rgba(var(--accent3-rgb), .2)); border: 1px solid var(--border-strong); font-size: 1.5rem; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 84px; height: 84px; font-size: 2.6rem; }
.avatar--sm { width: 32px; height: 32px; font-size: 1rem; }

.tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius-pill); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: transparent; color: var(--text-soft); padding: 8px 14px; border-radius: var(--radius-pill); font-weight: 650; font-size: .86rem; cursor: pointer; white-space: nowrap; transition: background var(--transition), color var(--transition); }
.tab:hover { color: var(--text); background: rgba(var(--accent-rgb), .08); }
.tab.is-active { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--on-accent); }

.progress { height: 10px; border-radius: 999px; background: rgba(var(--accent-rgb), .12); overflow: hidden; }
.progress__bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3)); transition: width .5s var(--ease); box-shadow: 0 0 18px rgba(var(--accent-rgb), .6); }
.progress--sm { height: 6px; }
.progress--lg { height: 16px; }

.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(var(--accent-rgb), .13) 0); display: grid; place-items: center; position: relative; }
.ring::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: var(--bg); }
.ring__label { position: relative; font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; }

.modal-overlay { position: fixed; inset: 0; z-index: var(--z-modal); background: rgba(0, 0, 0, .62); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: var(--space-4); opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal { width: min(560px, 100%); max-height: min(88vh, 900px); overflow: auto; border-radius: var(--radius-lg); background: var(--panel-strong); border: 1px solid var(--border-strong); box-shadow: 0 40px 120px -40px rgba(0, 0, 0, .9); transform: translateY(14px) scale(.98); transition: transform var(--transition); }
.modal-overlay.is-open .modal { transform: none; }
.modal--wide { width: min(980px, 100%); }
.modal--xl { width: min(1200px, 100%); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--panel-strong); z-index: 2; }
.modal__title { margin: 0; font-size: 1.15rem; }
.modal__body { padding: var(--space-5); }
.modal__foot { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: var(--space-2); flex-wrap: wrap; position: sticky; bottom: 0; background: var(--panel-strong); }
.modal__close { border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.modal__close:hover { background: rgba(var(--accent-rgb), .1); color: var(--text); }

.toast-stack { position: fixed; right: 20px; top: 88px; z-index: var(--z-toast); display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); background: var(--panel-strong); border: 1px solid var(--border-strong); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9); animation: toastIn .3s var(--ease) both; }
.toast--success { border-left: 4px solid #35f0b0; }
.toast--error { border-left: 4px solid #ff5c6c; }
.toast--info { border-left: 4px solid var(--accent); }
.toast__title { font-weight: 700; }
.toast__msg { font-size: .86rem; color: var(--muted); }
.toast__close { margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

.trophy { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3); border-radius: var(--radius-md); background: var(--panel); border: 1px solid var(--border); }
.trophy__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.2rem; background: rgba(var(--accent-rgb), .12); color: var(--accent); flex: none; }
.trophy__name { font-weight: 700; }
.trophy__meta { font-size: .76rem; color: var(--muted); }
.trophy--legendaria .trophy__icon { background: rgba(255, 179, 71, .16); color: #ffb347; }
.trophy--epica .trophy__icon { background: rgba(157, 107, 255, .16); color: #b18cff; }
.trophy--rara .trophy__icon { background: rgba(56, 240, 255, .14); color: #38f0ff; }

.empty { padding: var(--space-6); text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius-md); color: var(--muted); }
.empty__icon { font-size: 2rem; margin-bottom: var(--space-2); color: var(--accent); }

.list { display: flex; flex-direction: column; gap: var(--space-2); }
.list__item { display: flex; align-items: center; gap: var(--space-3); padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--panel); }
.list__item:hover { border-color: var(--border-strong); }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--panel); border: 1px solid var(--border); font-size: .74rem; color: var(--text-soft); }
.tag--accent { background: rgba(var(--accent-rgb), .12); border-color: rgba(var(--accent-rgb), .25); color: var(--accent); }

.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--space-2); }
.option-card { position: relative; padding: 10px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--panel); cursor: pointer; text-align: center; transition: border-color var(--transition), transform var(--transition); }
.option-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.option-card.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .2); }
.option-card__label { font-size: .78rem; font-weight: 650; margin-top: 6px; }
.option-card input { position: absolute; opacity: 0; }

.swatch { height: 42px; border-radius: 10px; position: relative; overflow: hidden; }
.swatch span { position: absolute; bottom: 4px; right: 4px; width: 12px; height: 12px; border-radius: 50%; }
.theme-swatch { display: flex; gap: 3px; height: 40px; border-radius: 10px; overflow: hidden; }
.theme-swatch span { flex: 1; }
.theme-swatch span:nth-child(2) { flex: .7; }
.theme-swatch span:nth-child(3) { flex: .45; }

.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.status-dot--live { background: #35f0b0; box-shadow: 0 0 10px #35f0b0; animation: pulse 1.6s infinite; }
.status-dot--warn { background: #ffb347; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

.countdown { display: flex; gap: var(--space-3); }
.countdown__unit { min-width: 64px; padding: 10px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--border); text-align: center; }
.countdown__value { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; color: var(--accent); }
.countdown__label { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

.tooltip { position: relative; }
.tooltip::after { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px); background: var(--panel-strong); color: var(--text); border: 1px solid var(--border-strong); padding: 6px 10px; border-radius: 8px; font-size: .74rem; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity var(--transition), transform var(--transition); z-index: 5; }
.tooltip:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

.confetti-canvas { position: fixed; inset: 0; pointer-events: none; z-index: 130; }
