/* ==========================================================================
   Replay Analyzer — Page-Specific Styles
   Extracted from pages/Replay-Analyzer.html
   ========================================================================== */

:root {
    /* Crimson/Obsidian Theme (Pro Analysis) */
    --bg-color: #0a0a0a;
    /* Neutral-950 */
    --bg-secondary: #171717;
    /* Neutral-900 */
    --text-color: #f5f5f5;
    /* Neutral-50 */
    --text-muted: #a3a3a3;
    /* Neutral-400 */

    /* High Contrast Accents */
    --accent-color: #ef4444;
    /* Red-500 */
    --accent-glow: #b91c1c;
    /* Red-700 */
    --accent-secondary: #f59e0b;
    /* Amber-500 */

    /* Clean Glass */
    --glass-bg: rgba(23, 23, 23, 0.85);
    --glass-border: rgba(64, 64, 64, 0.5);
    --glass-highlight: rgba(255, 255, 255, 0.05);

    /* Chart/Data Colors */
    --player1-color: #ef4444;
    /* Red */
    --player2-color: #f59e0b;
    /* Amber */
    --delta-positive: #10b981;
    /* Emerald */
    --delta-negative: #f43f5e;
    /* Rose */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #171717 100%);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    background-attachment: fixed;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Explanation Card Style (Distinct from analysis cards) */
.info-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(168, 85, 247, 0.3);
    /* Top highlight */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
    box-shadow: 0 8px 30px rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.4);
}

.info-card h2 {
    background: linear-gradient(to right, #ef4444, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
}

.info-card i {
    /* Reset ion fill for icon since background-clip hides it on text */
    -webkit-text-fill-color: var(--accent-color);
    color: var(--accent-color);
}

.info-card p,
.info-card li {
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.9;
    line-height: 1.7;
}

.info-card ul {
    margin: 0.5rem 0 0 1.5rem;
}

/* Home Button */
.home-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    color: var(--text-color);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.home-button:hover {
    transform: translateY(-3px) scale(1.05);
    border-color: var(--accent-color);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
    /* Red glow */
}

.home-button i {
    font-size: 20px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Contribution Opt-in */
.contribution-option {
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.08);
    /* Red tint */
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    text-align: left;
    backdrop-filter: blur(4px);
}

.contribution-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.contribution-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent-color);
    cursor: pointer;
    flex-shrink: 0;
}

.contribution-label strong {
    color: var(--accent-color);
}

.contribution-details {
    margin-top: 0.5rem;
    padding-left: 30px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.contribution-details summary {
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.contribution-details summary:hover {
    opacity: 1;
}

.drop-zone {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 2px dashed var(--glass-border);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent-color);
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(220, 38, 38, 0.3);
}

.drop-zone svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    fill: var(--accent-color);
}

.drop-zone p {
    margin: 0;
    color: var(--text-muted);
    font-size: 1rem;
}

#fileInput {
    display: none;
}

/* Analysis Results */
.analysis-container {
    margin-top: 2rem;
    display: none;
}

.analysis-container.visible {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.player-names {
    display: flex;
    gap: 1.5rem;
}

.player-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.player-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.player-dot.p1 {
    background: var(--player1-color);
}

.player-dot.p2 {
    background: var(--player2-color);
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Summary Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-value.positive {
    color: var(--delta-positive);
}

.stat-value.negative {
    color: var(--delta-negative);
}

.stat-value.neutral {
    color: var(--text-muted);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.error-message {
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    color: #f87171;
    margin-top: 1rem;
}

/* Opening hand card images */
.hand-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.hand-card {
    width: 60px;
    height: 88px;
    border-radius: 4px;
    /* overflow: hidden;  <-- Removed to allow badges to overflow if needed */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
    cursor: pointer;
    position: relative;
    /* Context for absolute badges */
}

.hand-card:hover {
    transform: scale(1.15);
    z-index: 10;
}

.hand-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.hand-card.hand-trap {
    box-shadow: 0 0 8px 2px rgba(244, 114, 182, 0.6);
}

/* Card Loader Popup Styles (Simulating Tailwind classes used in card-loader.js) */
#card-popup {
    background: #0f172a !important;
    border: 2px solid #3b82f6 !important;
    color: #e2e8f0 !important;
    padding: 1rem !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.5) !important;
    opacity: 0;
    transition: opacity 200ms ease-in-out;
    pointer-events: none;
    z-index: 10000;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    max-width: 420px !important;
    max-height: calc(100vh - 40px) !important;
    overflow-y: auto !important;
}

/* Tailwind utility classes for CardLoader tabs */
#card-popup .hidden {
    display: none !important;
}

#card-popup .flex {
    display: flex !important;
}

#card-popup .flex-col {
    flex-direction: column !important;
}

#card-popup .flex-1 {
    flex: 1 1 0% !important;
}

#card-popup .flex-shrink-0 {
    flex-shrink: 0 !important;
}

#card-popup .items-center {
    align-items: center !important;
}

#card-popup .items-start {
    align-items: flex-start !important;
}

#card-popup .justify-between {
    justify-content: space-between !important;
}

#card-popup .gap-2 {
    gap: 0.5rem !important;
}

/* Tab button styles */
#card-popup .tab-btn {
    background: transparent;
    border: none;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#card-popup .tab-btn.text-blue-400 {
    color: #60a5fa !important;
}

#card-popup .tab-btn.border-blue-500 {
    border-bottom: 2px solid #3b82f6 !important;
}

#card-popup .tab-btn.text-slate-200 {
    color: #e2e8f0 !important;
}

#card-popup .tab-btn.border-transparent {
    border-bottom: 2px solid transparent !important;
}

#card-popup .tab-btn:hover {
    color: #ffffff !important;
}

/* Tab content area */
#card-popup .tab-content {
    padding: 0.5rem 0;
}

/* Card name styling */
#card-popup h3,
#card-popup .text-blue-400 {
    color: #60a5fa !important;
}

#card-popup .text-lg {
    font-size: 1.125rem !important;
}

#card-popup .font-bold {
    font-weight: 700 !important;
}

/* Text colors */
#card-popup .text-gray-300,
#card-popup .text-slate-200 {
    color: #cbd5e1 !important;
}

#card-popup .text-gray-400,
#card-popup .text-slate-400 {
    color: #9ca3af !important;
}

#card-popup .text-gray-500,
#card-popup .text-slate-500 {
    color: #6b7280 !important;
}

#card-popup .text-green-400 {
    color: #4ade80 !important;
}

#card-popup .text-yellow-400 {
    color: #facc15 !important;
    background: rgba(250, 204, 21, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}

#card-popup .text-amber-400 {
    color: #fbbf24 !important;
}

#card-popup .text-cyan-400 {
    color: #22d3ee !important;
}

/* Border styles */
#card-popup .border-b {
    border-bottom-width: 1px !important;
}

#card-popup .border-t {
    border-top-width: 1px !important;
}

#card-popup .border-slate-600 {
    border-color: #475569 !important;
}

#card-popup .border-slate-700 {
    border-color: #334155 !important;
}

/* Spacing */
#card-popup .mt-1 {
    margin-top: 0.25rem !important;
}

#card-popup .mt-2 {
    margin-top: 0.5rem !important;
}

#card-popup .mt-3 {
    margin-top: 0.75rem !important;
}

#card-popup .mb-2 {
    margin-bottom: 0.5rem !important;
}

#card-popup .pt-2 {
    padding-top: 0.5rem !important;
}

#card-popup .py-1\.5 {
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
}

/* Font sizes */
#card-popup .text-xs {
    font-size: 0.75rem !important;
}

#card-popup .text-\[10px\] {
    font-size: 10px !important;
}

/* Backgrounds */
#card-popup .bg-slate-800 {
    background-color: #1e293b !important;
}

/* Border radius */
#card-popup .rounded-full {
    border-radius: 9999px !important;
}

#card-popup .rounded-lg {
    border-radius: 0.5rem !important;
}

/* Price bars */
#card-popup .h-3 {
    height: 0.75rem !important;
}

#card-popup .overflow-hidden {
    overflow: hidden !important;
}

/* Tag section styles */
#card-popup .uppercase {
    text-transform: uppercase !important;
}

#card-popup .gap-1 {
    gap: 0.25rem !important;
}

#card-popup .gap-1\.5 {
    gap: 0.375rem !important;
}

#card-popup .mb-0\.5 {
    margin-bottom: 0.125rem !important;
}

#card-popup .mb-1\.5 {
    margin-bottom: 0.375rem !important;
}

#card-popup .mx-1\.5 {
    margin-left: 0.375rem !important;
    margin-right: 0.375rem !important;
}

#card-popup .pl-0 {
    padding-left: 0 !important;
}

#card-popup .px-2 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

#card-popup .py-0\.5 {
    padding-top: 0.125rem !important;
    padding-bottom: 0.125rem !important;
}

#card-popup .leading-tight {
    line-height: 1.25 !important;
}

#card-popup .opacity-90 {
    opacity: 0.9 !important;
}

#card-popup .opacity-40 {
    opacity: 0.4 !important;
}

#card-popup .inline-flex {
    display: inline-flex !important;
}

#card-popup .text-slate-300 {
    color: #cbd5e1 !important;
}

#card-popup .border-gray-700 {
    border-color: #374151 !important;
}

/* Tag category colors */
#card-popup .text-red-400 {
    color: #f87171 !important;
}

#card-popup .text-blue-400 {
    color: #60a5fa !important;
}

#card-popup .text-indigo-400 {
    color: #818cf8 !important;
}

#card-popup .text-rose-400 {
    color: #fb7185 !important;
}

#card-popup .text-teal-400 {
    color: #2dd4bf !important;
}

#card-popup .text-purple-400 {
    color: #c084fc !important;
}

#card-popup .text-emerald-400 {
    color: #34d399 !important;
}

#card-popup .text-fuchsia-400 {
    color: #e879f9 !important;
}

/* Hand Trap badge */
#card-popup .bg-yellow-500\/90 {
    background-color: rgba(234, 179, 8, 0.9) !important;
}

#card-popup .text-yellow-900 {
    color: #713f12 !important;
}

#card-popup .border-yellow-400 {
    border-color: #facc15 !important;
}

#card-popup .shadow-yellow-500\/30 {
    box-shadow: 0 1px 3px rgba(234, 179, 8, 0.3) !important;
}

#card-popup.show {
    opacity: 1;
}

/* Tag Actions Pill Styles */
#card-popup .rounded {
    border-radius: 0.25rem !important;
}

#card-popup .font-medium {
    font-weight: 500 !important;
}

#card-popup .bg-slate-800\/80 {
    background-color: rgba(30, 41, 59, 0.8) !important;
}

#card-popup .bg-slate-800\/40 {
    background-color: rgba(30, 41, 59, 0.4) !important;
}

#card-popup .border-slate-700\/60 {
    border-color: rgba(51, 65, 85, 0.6) !important;
}

#card-popup .border-slate-700\/20 {
    border-color: rgba(51, 65, 85, 0.2) !important;
}

#card-popup .hover\:bg-slate-700:hover {
    background-color: #334155 !important;
}

#card-popup .hover\:border-slate-500:hover {
    border-color: #64748b !important;
}

#card-popup .hover\:text-white:hover {
    color: #ffffff !important;
}

#card-popup .ml-1\.5 {
    margin-left: 0.375rem !important;
}

#card-popup .px-2\.5 {
    padding-left: 0.625rem !important;
    padding-right: 0.625rem !important;
}

#card-popup .group {
    position: relative;
}

#card-popup .group:hover .group-hover\:opacity-100 {
    opacity: 1 !important;
}

#card-popup .group:hover .group-hover\:text-white {
    color: #ffffff !important;
}

#card-popup .group:hover .group-hover\:text-slate-300 {
    color: #cbd5e1 !important;
}

#card-popup .transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

#card-popup .text-shadow-sm {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#card-popup button {
    font-family: inherit;
}

/* Banlist Badges */
.banned-badge,
.limited-badge,
.semilimited-badge {
    font-size: 0.5rem !important;
    padding: 2px 4px !important;
    z-index: 20 !important;
}

/* Download button */
.btn {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px -5px rgba(56, 189, 248, 0.5);
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.btn-secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

/* Deck List Cards */
.deck-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.deck-card {
    width: 70px;
    height: 102px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
    cursor: pointer;
    position: relative;
}

.deck-card:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
}

.deck-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Deck Tabs */
.deck-tab-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.deck-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.deck-tab-btn:hover {
    color: var(--text-primary);
}

.deck-tab-btn.active {
    color: var(--accent-red);
    border-bottom-color: var(--accent-red);
}

.deck-tab-btn.active-p2 {
    color: var(--accent-amber);
    border-bottom-color: var(--accent-amber);
}

/* Overrides for Card Popup to ensure content fits */
#card-popup>div {
    max-height: 550px !important;
}

#card-popup .overflow-y-auto {
    padding-bottom: 2rem !important;
    /* Ensure space for prices at bottom */
}

/* Tag Statistics Styles */
.hand-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}

.tag-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8rem;
}

.tag-stat.starter {
    border-color: rgba(76, 175, 80, 0.6);
}

.tag-stat.extender {
    border-color: rgba(33, 150, 243, 0.6);
}

.tag-stat.searcher {
    border-color: rgba(156, 39, 176, 0.6);
}

.tag-stat.board-breaker {
    border-color: rgba(255, 87, 34, 0.6);
}

.tag-stat .icon {
    font-size: 0.9rem;
}

.tag-stat .count {
    font-weight: 700;
    margin-left: 2px;
}

.tag-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.5rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(100, 100, 255, 0.15);
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-pill:hover {
    background: rgba(100, 100, 255, 0.35);
    transform: translateY(-1px);
}

.tag-pill .tag-count {
    background: rgba(255, 255, 255, 0.15);
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 600;
}

.tags-unavailable {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.25rem;
}

/* Interactive Card Highlighting */
.hand-card.highlight {
    box-shadow: 0 0 15px 2px rgba(250, 204, 21, 0.6) !important;
    /* Yellow glow */
    transform: scale(1.1);
    z-index: 20;
    border: 2px solid rgba(250, 204, 21, 0.8);
}

.hand-card.dim {
    opacity: 0.3;
    filter: grayscale(0.8);
    transform: scale(0.95);
}

/* Custom SVG Icon Styles */
.icon-inline {
    width: 1.25em;
    height: 1.25em;
    vertical-align: -0.2em;
    margin-right: 0.4rem;
    flex-shrink: 0;
}

.icon-tag {
    width: 1em;
    height: 1em;
    vertical-align: -0.1em;
    margin-right: 4px;
    flex-shrink: 0;
}

.icon-warning-inline {
    width: 1em;
    height: 1em;
    vertical-align: -0.1em;
    margin-right: 4px;
}

.icon-otk {
    width: 1.2em;
    height: 1.2em;
    vertical-align: -0.15em;
    margin-right: 4px;
}

.icon-verdict {
    width: 1.5em;
    height: 1.5em;
    vertical-align: -0.3em;
    margin-right: 0.25rem;
}

.card-title .icon-inline {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.3));
}

/* Tag stat icon hover effect */
.tag-stat:hover .icon-tag {
    transform: scale(1.15);
    transition: transform 0.2s ease;
}

/* Tooltip System */
.has-tooltip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.3);
}

.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 0.75rem;
    background: rgba(23, 23, 23, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-color);
    white-space: normal;
    width: max-content;
    max-width: 220px;
    text-align: center;
    line-height: 1.4;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.has-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(23, 23, 23, 0.95);
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.has-tooltip:hover::after,
.has-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Verdict tooltip positioning (larger elements) */
.stat-value.has-tooltip::after {
    bottom: auto;
    top: calc(100% + 8px);
    max-width: 250px;
}

.stat-value.has-tooltip::before {
    bottom: auto;
    top: calc(100% + 2px);
    border-top-color: transparent;
    border-bottom-color: rgba(23, 23, 23, 0.95);
}

/* Info icon for clickable help */
.info-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-left: 4px;
    cursor: help;
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.info-trigger:hover {
    background: rgba(239, 68, 68, 0.3);
    color: var(--accent-color);
}
