/* ============================================================
   Chaotic TCG Pack Simulator — Styles
   ============================================================ */

/* ─── CSS Variables ─── */
:root {
    --cps-bg: #0d0d1a;
    --cps-surface: #1a1a2e;
    --cps-surface2: #222244;
    --cps-accent: #e94560;
    --cps-accent2: #0f3460;
    --cps-gold: #ffd700;
    --cps-silver: #c0c0c0;
    --cps-text: #e0e0e0;
    --cps-text-muted: #888;
    --cps-common: #aaaaaa;
    --cps-uncommon: #4fc3f7;
    --cps-rare: #ffd740;
    --cps-super-rare: #e040fb;
    --cps-ultra-rare: #ff1744;
    --cps-radius: 8px;
    --cps-card-width: 130px;
    --cps-card-height: 182px;
}

/* ─── Reset for the app container ─── */
#cps-app, #cps-collection-app {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--cps-text);
    background: var(--cps-bg);
    padding: 20px;
    border-radius: 12px;
    min-height: 400px;
    position: relative;
}
#cps-app *, #cps-collection-app * {
    box-sizing: border-box;
}

/* ─── Header ─── */
.cps-header {
    text-align: center;
    margin-bottom: 16px;
}
.cps-header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 2px;
}
.cps-header-logo img {
    height: 52px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(200,30,30,0.4));
}
.cps-header h1 {
    font-size: 1.6em;
    color: var(--cps-silver);
    margin: 0;
    text-shadow: 0 0 12px rgba(200,30,30,0.35), 0 0 30px rgba(200,30,30,0.15);
    letter-spacing: 2px;
    font-weight: 700;
}
.cps-header p {
    color: var(--cps-text-muted);
    margin: 0;
    font-size: 0.85em;
}

/* ─── Set Grid ─── */
.cps-set-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.cps-set-card {
    background: var(--cps-surface);
    border: 2px solid transparent;
    border-radius: var(--cps-radius);
    padding: 8px 6px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}
.cps-set-card:hover {
    border-color: var(--cps-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233,69,96,0.2);
}
.cps-set-card.selected {
    border-color: var(--cps-gold);
    box-shadow: 0 0 15px rgba(255,215,0,0.3);
}
.cps-set-card .cps-set-thumb {
    width: 100%;
    max-width: 120px;
    height: 160px;
    object-fit: contain;
    border-radius: 4px;
    margin-bottom: 4px;
}
.cps-set-card .cps-set-thumb-placeholder {
    width: 100%;
    max-width: 120px;
    height: 160px;
    background: var(--cps-surface2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4em;
    color: var(--cps-text-muted);
    margin: 0 auto 4px auto;
}
.cps-set-card .cps-set-name {
    font-weight: 600;
    font-size: 0.8em;
    margin-bottom: 3px;
    line-height: 1.2;
}
.cps-set-card .cps-set-count-info {
    color: var(--cps-text-muted);
    font-size: 0.7em;
    margin-bottom: 4px;
}

/* ─── Pack/Box Count Controls ─── */
.cps-qty-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-top: 3px;
}
.cps-qty-controls button {
    width: 22px;
    height: 22px;
    border: 1px solid var(--cps-silver);
    background: var(--cps-surface2);
    color: var(--cps-text);
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}
.cps-qty-controls button:hover {
    background: var(--cps-accent);
    border-color: var(--cps-accent);
}
.cps-qty-controls .cps-qty-val {
    width: 32px;
    text-align: center;
    font-size: 0.8em;
    font-weight: bold;
    background: transparent;
    border: 1px solid var(--cps-silver);
    color: var(--cps-text);
    border-radius: 3px;
    padding: 2px;
    height: 22px;
    -moz-appearance: textfield;
}
.cps-qty-controls .cps-qty-val::-webkit-outer-spin-button,
.cps-qty-controls .cps-qty-val::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cps-qty-label {
    font-size: 0.6em;
    color: var(--cps-text-muted);
    margin-top: 1px;
}
.cps-qty-box-display {
    font-size: 0.65em;
    color: var(--cps-text-muted);
    min-width: 30px;
    text-align: center;
}

/* ─── Open Button Bar ─── */
.cps-action-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.cps-btn {
    padding: 12px 28px;
    border: none;
    border-radius: var(--cps-radius);
    cursor: pointer;
    font-size: 1em;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}
.cps-btn-primary {
    background: linear-gradient(135deg, var(--cps-accent), #c0392b);
    color: white;
    box-shadow: 0 4px 15px rgba(233,69,96,0.4);
}
.cps-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(233,69,96,0.5);
}
.cps-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.cps-btn-secondary {
    background: var(--cps-surface2);
    color: var(--cps-text);
    border: 1px solid var(--cps-text-muted);
}
.cps-btn-secondary:hover {
    background: var(--cps-accent2);
    border-color: var(--cps-accent);
}
.cps-btn-gold {
    background: linear-gradient(135deg, #b8860b, var(--cps-gold));
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}
.cps-btn-gold:hover {
    box-shadow: 0 6px 25px rgba(255,215,0,0.5);
}
.cps-btn-sm {
    padding: 6px 16px;
    font-size: 0.85em;
}

/* ─── Pack Opening Area ─── */
.cps-opening-area {
    text-align: center;
    margin: 30px 0;
}
.cps-pack-group {
    margin-bottom: 40px;
    padding: 20px;
    background: var(--cps-surface);
    border-radius: 12px;
    border: 1px solid var(--cps-surface2);
}
.cps-pack-group-title {
    font-size: 1.3em;
    color: var(--cps-gold);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.cps-pack-group-title .cps-pack-num {
    background: var(--cps-accent);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
}

/* ─── Card Grid ─── */
.cps-card-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* ─── Individual Card ─── */
.cps-card-wrapper {
    position: relative;
    width: var(--cps-card-width);
    perspective: 800px;
}
.cps-card {
    width: var(--cps-card-width);
    height: var(--cps-card-height);
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    cursor: pointer;
}
.cps-card.flipped {
    transform: rotateY(180deg);
}
.cps-card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--cps-radius);
    overflow: hidden;
}
.cps-card-back {
    background: linear-gradient(145deg, #1a237e, #283593);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #3949ab;
}
/* Default fallback when no card-back image is uploaded */
.cps-card-back:not(.cps-card-back-img)::after {
    content: '?';
    font-size: 2.5em;
    font-weight: 700;
    color: rgba(255,255,255,0.25);
    font-family: serif;
}
/* Custom card-back image */
.cps-card-back.cps-card-back-img {
    background: none;
    border: none;
    padding: 0;
}
.cps-card-back.cps-card-back-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--cps-radius);
}
.cps-card-front {
    transform: rotateY(180deg);
    background: var(--cps-surface2);
    border: 2px solid transparent;
}
.cps-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--cps-radius) - 2px);
}

/* ─── Rarity Border Colors ─── */
.cps-card-front.rarity-common  { border-color: var(--cps-common); }
.cps-card-front.rarity-uncommon { border-color: var(--cps-uncommon); }
.cps-card-front.rarity-rare { border-color: var(--cps-rare); }
.cps-card-front.rarity-super-rare { border-color: var(--cps-super-rare); }
.cps-card-front.rarity-ultra-rare { border-color: var(--cps-ultra-rare); }

/* ─── Rarity Glow Auras ─── */
.cps-card.flipped .cps-card-front.rarity-rare {
    box-shadow: 0 0 10px 2px rgba(255,215,64,0.5);
}
.cps-card.flipped .cps-card-front.rarity-super-rare {
    box-shadow: 0 0 18px 4px rgba(224,64,251,0.6);
    animation: cps-aura-super 2s ease-in-out infinite;
}
.cps-card.flipped .cps-card-front.rarity-ultra-rare {
    box-shadow: 0 0 25px 6px rgba(255,23,68,0.7);
    animation: cps-aura-ultra 1.8s ease-in-out infinite;
}

@keyframes cps-aura-super {
    0%, 100% { box-shadow: 0 0 18px 4px rgba(224,64,251,0.6); }
    50% { box-shadow: 0 0 30px 8px rgba(224,64,251,0.9), 0 0 60px 12px rgba(103,58,183,0.3); }
}

@keyframes cps-aura-ultra {
    0% { box-shadow: 0 0 25px 6px rgba(255,23,68,0.7), 0 0 40px 8px rgba(255,215,0,0.0); }
    25% { box-shadow: 0 0 30px 8px rgba(255,215,0,0.8), 0 0 50px 12px rgba(233,30,99,0.3); }
    50% { box-shadow: 0 0 25px 6px rgba(0,255,200,0.7), 0 0 50px 12px rgba(33,150,243,0.3); }
    75% { box-shadow: 0 0 30px 8px rgba(156,39,176,0.8), 0 0 50px 12px rgba(255,152,0,0.3); }
    100% { box-shadow: 0 0 25px 6px rgba(255,23,68,0.7), 0 0 40px 8px rgba(255,215,0,0.0); }
}

/* ─── Holographic Overlay for Super/Ultra Rare ─── */
.cps-holo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: calc(var(--cps-radius) - 2px);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.cps-card.flipped .cps-holo-overlay.active {
    opacity: 1;
}
.cps-holo-overlay.rarity-super-rare {
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(224,64,251,0.15) 25%,
        rgba(103,58,183,0.1) 50%,
        rgba(0,188,212,0.15) 75%,
        transparent 100%
    );
    animation: cps-holo-shift 3s ease-in-out infinite;
}
.cps-holo-overlay.rarity-ultra-rare {
    background: linear-gradient(
        135deg,
        rgba(255,0,0,0.15) 0%,
        rgba(255,165,0,0.15) 16%,
        rgba(255,255,0,0.1) 33%,
        rgba(0,255,0,0.1) 50%,
        rgba(0,0,255,0.15) 66%,
        rgba(128,0,128,0.15) 83%,
        rgba(255,0,0,0.15) 100%
    );
    background-size: 200% 200%;
    animation: cps-rainbow-shift 2s linear infinite;
}

@keyframes cps-holo-shift {
    0%, 100% { background-position: 0% 50%; opacity: 0.6; }
    50% { background-position: 100% 50%; opacity: 1; }
}
@keyframes cps-rainbow-shift {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 200%; }
}

/* ─── Card Reveal Entrance Animation ─── */
.cps-card-wrapper {
    opacity: 0;
    transform: translateY(30px) scale(0.8);
    animation: cps-card-enter 0.5s ease forwards;
}
.cps-card-wrapper.reveal-super {
    animation: cps-card-enter-super 0.8s ease forwards;
}
.cps-card-wrapper.reveal-ultra {
    animation: cps-card-enter-ultra 1s ease forwards;
}

@keyframes cps-card-enter {
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cps-card-enter-super {
    0% { opacity: 0; transform: translateY(30px) scale(0.5); }
    50% { transform: translateY(-10px) scale(1.15); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cps-card-enter-ultra {
    0% { opacity: 0; transform: translateY(40px) scale(0.3) rotate(-10deg); }
    40% { transform: translateY(-15px) scale(1.25) rotate(3deg); }
    70% { transform: translateY(5px) scale(1.05) rotate(-1deg); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}

/* ─── Hover Enlarge / Tooltip ─── */
/* Hovered wrapper gets elevated z-index so its tooltip is always on top */
.cps-card-wrapper:hover {
    z-index: 9999;
}
.cps-card-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: calc(var(--cps-card-width) * 2);
    background: var(--cps-surface);
    border: 2px solid var(--cps-accent);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: bottom center;
    overflow: hidden;
}
.cps-card-tooltip.show {
    transform: translateX(-50%) scale(1);
    opacity: 1;
}
.cps-card-tooltip img {
    width: 100%;
    display: block;
}
.cps-card-tooltip-info {
    padding: 8px 12px;
    background: rgba(0,0,0,0.6);
}
.cps-card-tooltip-name {
    font-weight: 700;
    font-size: 1.1em;
    margin-bottom: 4px;
}
.cps-card-tooltip-meta {
    font-size: 0.85em;
    color: var(--cps-text-muted);
}
/* Tooltip speech-bubble arrow — always points down (tooltip always above) */
.cps-card-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--cps-accent);
}

/* ─── Rarity Badge ─── */
.cps-rarity-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}
.cps-card.flipped .cps-rarity-badge {
    opacity: 1;
}
.cps-rarity-badge.rarity-common { background: var(--cps-common); color: #1a1a2e; }
.cps-rarity-badge.rarity-uncommon { background: var(--cps-uncommon); color: #1a1a2e; }
.cps-rarity-badge.rarity-rare { background: var(--cps-rare); color: #1a1a2e; }
.cps-rarity-badge.rarity-super-rare { background: var(--cps-super-rare); color: white; }
.cps-rarity-badge.rarity-ultra-rare { background: var(--cps-ultra-rare); color: white; }

/* ─── Type Badge (bottom left) ─── */
.cps-type-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.55em;
    font-weight: 600;
    background: rgba(0,0,0,0.7);
    color: var(--cps-text);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s;
}
.cps-card.flipped .cps-type-badge {
    opacity: 1;
}

/* ─── Results Summary ─── */
.cps-results-summary {
    background: var(--cps-surface);
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid var(--cps-surface2);
}
.cps-results-summary h3 {
    color: var(--cps-gold);
    margin-top: 0;
}
.cps-results-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* ─── Pack Opening Animation ─── */
.cps-pack-anim {
    display: inline-block;
    width: 100px;
    height: 140px;
    background: linear-gradient(145deg, #1a237e, #283593);
    border: 2px solid var(--cps-gold);
    border-radius: 8px;
    position: relative;
    margin: 10px;
    animation: cps-pack-shake 0.5s ease-in-out;
    overflow: hidden;
}
.cps-pack-anim::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255,215,0,0.15) 50%,
        transparent 70%
    );
    animation: cps-pack-shine 1s linear;
}
.cps-pack-anim.opening {
    animation: cps-pack-open 0.8s ease forwards;
}

@keyframes cps-pack-shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}
@keyframes cps-pack-shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}
@keyframes cps-pack-open {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0) rotateY(90deg); opacity: 0; }
}

/* ─── Pack sub-section (within a set box) ─── */
.cps-pack-sub {
    position: relative;
    padding: 8px 0;
}
.cps-pack-sub-num {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--cps-surface2);
    color: var(--cps-text-muted);
    font-size: 0.65em;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 5;
}
.cps-pack-separator {
    border: none;
    border-top: 1px solid var(--cps-surface2);
    margin: 4px 12px;
}

/* ─── Loading spinner ─── */
.cps-loading {
    text-align: center;
    padding: 40px;
}
.cps-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid var(--cps-surface2);
    border-top-color: var(--cps-accent);
    border-radius: 50%;
    animation: cps-spin 0.8s linear infinite;
}
@keyframes cps-spin {
    to { transform: rotate(360deg); }
}

/* ─── Flip All / Back Buttons ─── */
.cps-pack-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

/* ─── Collection page styles ─── */
.cps-collection-set {
    margin-bottom: 30px;
    background: var(--cps-surface);
    padding: 20px;
    border-radius: 12px;
}
.cps-collection-set h3 {
    color: var(--cps-gold);
    margin-top: 0;
    border-bottom: 1px solid var(--cps-surface2);
    padding-bottom: 8px;
}
.cps-collection-card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cps-collection-card {
    width: 100px;
    text-align: center;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s;
}
.cps-collection-card:hover {
    transform: translateY(-2px);
    z-index: 9999;
}
.cps-collection-card img {
    width: 100%;
    border-radius: 4px;
    border: 2px solid var(--cps-common);
}
.cps-collection-card .cps-card-qty {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--cps-accent);
    color: white;
    font-size: 0.7em;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 18px;
}
.cps-collection-card .cps-card-label {
    font-size: 0.7em;
    margin-top: 4px;
    color: var(--cps-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .cps-set-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    :root {
        --cps-card-width: 100px;
        --cps-card-height: 140px;
    }
    .cps-header h1 { font-size: 1.2em; }
    .cps-header-logo img { height: 36px; }
    .cps-card-tooltip {
        width: calc(var(--cps-card-width) * 2);
    }
}

/* ─── Tab nav (for set select vs opening) ─── */
.cps-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
}
.cps-tab {
    padding: 8px 20px;
    background: var(--cps-surface2);
    border: 1px solid var(--cps-text-muted);
    border-radius: 6px 6px 0 0;
    color: var(--cps-text-muted);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.cps-tab:hover { color: var(--cps-text); }
.cps-tab.active {
    background: var(--cps-surface);
    color: var(--cps-gold);
    border-color: var(--cps-gold);
    border-bottom-color: transparent;
}

/* ─── Search / filter bar ─── */
.cps-filter-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.cps-filter-bar input[type="text"] {
    padding: 6px 12px;
    border: 1px solid var(--cps-text-muted);
    border-radius: var(--cps-radius);
    background: var(--cps-surface2);
    color: var(--cps-text);
    font-size: 0.85em;
    width: 240px;
}
.cps-filter-bar input[type="text"]::placeholder {
    color: var(--cps-text-muted);
}

/* ─── Toast notification ─── */
.cps-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--cps-accent);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.cps-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.cps-toast.success { background: #2e7d32; }
.cps-toast.error { background: #c62828; }

/* ─── Import Single Card rows ─── */
.coll-import-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    margin-bottom: 4px;
    background: var(--cps-surface2);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.coll-import-row:hover {
    background: var(--cps-accent2);
}

/* ─── Discord Login / User Bar ─── */
.cps-user-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 6px 12px;
    margin-bottom: 8px;
    background: var(--cps-surface);
    border-radius: 8px;
    border: 1px solid var(--cps-surface2);
    font-size: 0.85em;
}
.cps-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--cps-silver);
}
.cps-user-name {
    color: var(--cps-silver);
    font-weight: 600;
}
.cps-discord-btn {
    background: #5865F2 !important;
    color: white !important;
    border: none !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.cps-discord-btn:hover {
    background: #4752C4 !important;
}

/* ─── Summary stat bars ─── */
.cps-stat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
    font-size: 0.85em;
}
.cps-stat-bar .cps-stat-label {
    width: 90px;
    text-align: right;
    font-weight: 600;
}
.cps-stat-bar .cps-stat-fill-bg {
    flex: 1;
    height: 14px;
    background: var(--cps-surface2);
    border-radius: 7px;
    overflow: hidden;
}
.cps-stat-bar .cps-stat-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.5s ease;
}
.cps-stat-bar .cps-stat-num {
    width: 40px;
    text-align: left;
    color: var(--cps-text-muted);
}
