/* 
 * Projeto: Champions Stats
 * Descrição: Arquivo de estilos principal - Tema Light com Vermelho Pastel
 * Autor: Antigravity AI
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300..900&family=Inter:wght@300..700&display=swap');

:root {
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Outfit", sans-serif;

    /* Tema Light */
    --champions-bg: #fdfdfd;
    --champions-sidebar: #ffffff;
    --champions-panel: #ffffff;
    --champions-panel-hover: #f8f9fa;
    --champions-border: #eeeeee;
    
    /* Destaque Vermelho Marvel #D91616 */
    --champions-red: #D91616;
    --champions-red-hover: #f01d1d;
    --champions-red-dark: #b31212;
    --champions-red-glow: rgba(217, 22, 22, 0.15);
    --champions-blue: #2f80ed;
    
    /* Cores de Texto */
    --champions-text: #2d3436;
    --champions-text-muted: #636e72;
    --champions-text-light: #ffffff;

    /* Cores dos Aspectos */
    --aspect-aggression: #D91616; /* Vermelho */
    --aspect-protection: #27ae60; /* Verde */
    --aspect-leadership: #00bcd4; /* Azul Ciano */
    --aspect-justice: #f1c40f;    /* Amarelo Dourado */
    --aspect-basic: #95a5a6;      /* Cinza */
    --aspect-pool: #e84393;       /* Rosa (Pool) */

    --transition-base: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
    --header-height: 72px;

    /* Loading Spinner */
    --loading-blue: #2f80ed;
    --loading-red: #D91616;
}

/* Base & Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--champions-bg);
}

body {
    color: var(--champions-text);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customizada */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--champions-bg); }
::-webkit-scrollbar-thumb { background: #e0e0e0; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--champions-red); }

/* Layout Container */
.layout-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: calc(-1 * var(--sidebar-width));
    width: var(--sidebar-width);
    height: 100%;
    background-color: var(--champions-sidebar);
    border-right: 1px solid var(--champions-border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition-base);
    box-shadow: 10px 0 30px rgba(0,0,0,0.03);
}

.sidebar.open {
    left: 0;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid var(--champions-border);
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    font-size: 1.5rem;
    color: var(--champions-red);
}

.logo-text {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.logo-text-champions {
    color: var(--champions-red);
}

.logo-text-stats {
    color: var(--champions-blue);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 32px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--champions-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-base);
}

.nav-item:hover {
    background-color: var(--champions-panel-hover);
    color: var(--champions-red);
    transform: translateX(5px);
}

.nav-item.active {
    background-color: var(--champions-red-glow);
    color: var(--champions-red);
}

.nav-icon { 
    font-size: 1.1rem; 
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--champions-border);
}

.last-update {
    font-size: 0.75rem;
    color: var(--champions-text-muted);
    line-height: 1.6;
}

.last-update .date {
    color: var(--champions-text);
    font-weight: 700;
    display: block;
}

/* Main Area */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Header */
.top-header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--champions-border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 20px;
    z-index: 50;
}

.hamburger-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #f8f9fa;
    border: none;
    color: var(--champions-text);
    cursor: pointer;
    border-radius: 12px;
    transition: var(--transition-base);
}

.hamburger-btn:hover { background-color: var(--champions-border); }

.search-wrapper {
    flex: 1;
    position: relative;
    max-width: 450px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--champions-text-muted);
    pointer-events: none;
    z-index: 10;
}

.search-field {
    width: 100%;
    background-color: #f8f9fa;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 12px 16px 12px 44px;
    color: var(--champions-text);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-base);
}

.search-field:focus {
    background-color: #ffffff;
    border-color: var(--champions-red);
    box-shadow: 0 0 0 4px var(--champions-red-glow);
}

/* ── TomSelect Premium ── */
.search-wrapper .ts-wrapper {
    width: 100%;
}

.ts-wrapper.search-field {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.ts-control {
    background-color: #f8f9fa !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    color: var(--champions-text) !important;
    padding: 11px 16px 11px 44px !important;
    font-size: 0.95rem !important;
    font-family: var(--font-sans) !important;
    box-shadow: none !important;
    min-height: unset !important;
    cursor: text !important;
    transition: var(--transition-base);
}

.ts-control input {
    color: var(--champions-text) !important;
    font-size: 0.95rem !important;
    font-family: var(--font-sans) !important;
}

.ts-control input::placeholder {
    color: var(--champions-text-muted) !important;
}

.ts-wrapper.focus .ts-control {
    background-color: #ffffff !important;
    border-color: var(--champions-red) !important;
    box-shadow: 0 0 0 4px var(--champions-red-glow) !important;
}

.ts-dropdown {
    background: #ffffff !important;
    border: 1px solid var(--champions-border) !important;
    border-radius: 14px !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.1) !important;
    max-height: 320px !important;
    z-index: 1000 !important;
    margin-top: 6px !important;
    overflow: hidden;
}

.ts-dropdown .option {
    padding: 10px 16px !important;
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
}

.ts-dropdown .option:last-child { border-bottom: none; }

.ts-dropdown .option.active,
.ts-dropdown .option:hover {
    background-color: #fff5f5 !important;
    color: var(--champions-text) !important;
}

/* Ícone de busca some durante loading, spinner aparece */
.ts-wrapper.loading + .search-icon,
.ts-wrapper.loading ~ .search-icon { display: none; }

.search-wrapper.ts-loading-active .search-icon { display: none; }

.ts-wrapper.loading .ts-control::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid var(--champions-red);
    border-top-color: transparent;
    border-radius: 50%;
    animation: tspin 0.8s linear infinite;
    z-index: 20;
}

@keyframes tspin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* Resultado de busca */
.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.search-result-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--champions-text);
    display: flex;
    align-items: center;
    gap: 7px;
}

.search-result-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.search-result-type {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    color: var(--champions-text-muted);
    white-space: nowrap;
    background: #f0f2f4;
    padding: 3px 8px;
    border-radius: 6px;
}

.search-no-results {
    padding: 14px 16px;
    color: var(--champions-text-muted);
    font-size: 0.9rem;
}

.search-no-results strong { color: var(--champions-red); }

/* Esconde o chevron nativo do TomSelect */
.ts-wrapper .ts-control .clear-button,
.ts-wrapper .ts-control .dropdown-input { display: none; }

.user-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-filter-form {
    position: relative;
    display: flex;
    align-items: center;
}

.year-filter-icon {
    position: absolute;
    left: 13px;
    color: var(--champions-red);
    font-size: 0.85rem;
    pointer-events: none;
}

.year-filter-select {
    appearance: none;
    min-width: 112px;
    height: 42px;
    border: 1px solid var(--champions-border);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(217, 22, 22, 0.08), rgba(47, 128, 237, 0.06)),
        #ffffff;
    color: var(--champions-text);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 800;
    padding: 0 34px 0 36px;
    outline: none;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,0.04);
    transition: var(--transition-base);
}

.year-filter-form::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 13px;
    color: var(--champions-text-muted);
    font-size: 0.72rem;
    pointer-events: none;
}

.year-filter-select:hover,
.year-filter-select:focus {
    border-color: var(--champions-red);
    box-shadow: 0 0 0 4px var(--champions-red-glow);
}

/* Content Container */
.scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), 
        url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Mantém o fundo fixo enquanto o conteúdo rola */
    box-shadow: inset 0 100px 80px -50px rgba(0, 150, 255, 0.25); /* Sombreamento azul sutil no topo */
}

/* Home Layout */
.home-layout {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height) - 64px);
    text-align: center;
}

.hero-section {
    margin-bottom: 64px;
    animation: fadeInDown 0.8s ease-out;
}

.hero-image-container {
    margin-bottom: 40px;
    padding: 20px;
    background: #ffffff;
    border-radius: 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.05);
}

.hero-logo {
    max-width: 400px;
    width: 100%;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 900;
    color: var(--champions-text);
    margin-bottom: 16px;
    letter-spacing: -0.04em;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--champions-text-muted);
    max-width: 600px;
    margin: 0 auto 32px;
}

.btn-primary {
    background-color: var(--champions-red);
    color: white;
    padding: 16px 40px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-base);
    box-shadow: 0 10px 25px var(--champions-red-glow);
}

.btn-primary:hover {
    background-color: var(--champions-red-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px var(--champions-red-glow);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    width: 100%;
}

.feature-card {
    background: #ffffff;
    border: 1px solid var(--champions-border);
    padding: 40px;
    border-radius: 24px;
    text-align: left;
    transition: var(--transition-base);
    cursor: pointer;
}

.feature-card:hover {
    border-color: var(--champions-red);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.04);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--champions-red-glow);
    color: var(--champions-red);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-desc {
    color: var(--champions-text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsive */
@media (min-width: 1024px) {
    .hamburger-btn { display: none; }
    .sidebar { position: static; left: 0; box-shadow: none; }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Modal Sobre */
.champions-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
    padding: 20px;
}

.champions-modal.active {
    opacity: 1;
    visibility: visible;
}

.champions-modal .modal-content {
    width: 100%;
    max-width: 500px;
    position: relative;
    padding: 40px;
    animation: modalSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #f8f9fa;
    border: none;
    color: var(--champions-text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

.modal-close:hover {
    background: var(--champions-red-glow);
    color: var(--champions-red);
    transform: rotate(90deg);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.modal-icon-red {
    color: var(--champions-red);
    font-size: 1.5rem;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: left;
}

.stats-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--champions-text-muted);
    letter-spacing: 0.05em;
}

.dev-name-premium {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--champions-red);
}

.instagram-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--champions-text);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
}

.instagram-link:hover {
    color: var(--champions-red);
}

.instagram-link i {
    font-size: 1.4rem;
    color: var(--champions-red);
}

.modal-text {
    font-size: 0.95rem;
    color: var(--champions-text-muted);
    line-height: 1.6;
}

.legal-notice {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 16px;
    border-left: 4px solid var(--champions-red);
}

.notice-icon {
    font-size: 1.2rem;
    color: var(--champions-red);
    flex-shrink: 0;
}

.notice-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--champions-text);
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.notice-text {
    font-size: 0.8rem;
    color: var(--champions-text-muted);
    line-height: 1.5;
}

.about-link {
    text-decoration: none;
    color: var(--champions-red);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 16px;
    border-radius: 12px;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
}

.about-link:hover {
    background: var(--champions-red-glow);
}

@media (max-width: 768px) {
    .about-text { display: none; }
    .about-link { padding: 8px; width: 44px; height: 44px; justify-content: center; }
    .year-filter-select { min-width: 96px; padding-left: 34px; padding-right: 30px; }
}

/* Dashboard Layout & Components */
.dashboard-layout {
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.page-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--champions-red);
    letter-spacing: -0.03em;
}

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

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stats-card {
    background: var(--champions-panel);
    padding: 24px;
    border-radius: 20px;
    border: 1px solid var(--champions-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-base);
}

.stats-card:hover {
    transform: translateY(-5px);
    border-color: var(--champions-red);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.stats-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stats-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--champions-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.stats-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--champions-text);
}

.stats-icon-box {
    width: 52px;
    height: 52px;
    background: var(--champions-red-glow);
    color: var(--champions-red);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Charts & Details */
.dashboard-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.glass-panel {
    background: var(--champions-panel);
    border: 1px solid var(--champions-border);
    border-radius: 24px;
    padding: 32px;
}

.panel-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--champions-text);
}

/* Custom Bar Chart */
.custom-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 60px;
    align-items: center;
    gap: 16px;
}

.bar-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--champions-text);
}

.bar-track {
    height: 12px;
    background: #f1f3f5;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-percent {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--champions-text-muted);
    text-align: right;
}

/* TOP 10 Header */
.top-10-header-premium {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 48px 0 32px;
}

.trophy-box {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.3);
}

.title-text {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--champions-text);
    white-space: nowrap;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--champions-border), transparent);
}

/* Rankings Grid */
.rankings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    padding-bottom: 40px;
}

.rank-card {
    background: var(--champions-panel);
    border: 1px solid var(--champions-border);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition-base);
}

.rank-card:hover {
    border-color: var(--champions-red);
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
}

.rank-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--champions-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
}

.rank-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

.class-selector {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--champions-border);
    font-size: 0.85rem;
    background: white;
    color: var(--champions-text-muted);
    outline: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.class-selector:focus {
    border-color: var(--champions-red);
}

.rank-body {
    padding: 12px;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
}

.rank-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--champions-text-muted);
    font-weight: 700;
}

.rank-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid #f8f9fa;
}

.rank-table tr:last-child td {
    border-bottom: none;
}

.cell-name {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.cell-name a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

.cell-name a:hover {
    color: var(--champions-red);
}

.class-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.cell-percent {
    text-align: right;
    font-weight: 700;
    color: var(--champions-text);
}

/* Animations */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}



/* Componentes Premium de Carregamento */
.spinner-premium {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(47, 128, 237, 0.1);
    border-left-color: var(--loading-blue);
    border-right-color: var(--loading-red);
    border-radius: 50%;
    animation: spin-dual 1s linear infinite;
}

@keyframes spin-dual {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay-global {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.loading-overlay-global.active {
    opacity: 1;
    visibility: visible;
}

/* Overlay de Carregamento para Tabelas/Containers */
.table-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: flex-start; /* Alinhado ao topo */
    justify-content: center;
    padding-top: 80px; /* Pequeno padding top como solicitado */
    z-index: 50;
    border-radius: inherit;
    transition: var(--transition-base);
}

.table-loading-overlay.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.loading-text {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--champions-red);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Utilitários de Estatísticas */
.circle-val {
    width: 36px;
    height: 36px;
    background: #fdf2f2;
    color: var(--champions-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin: 0 auto;
    font-size: 0.9rem;
    border: 1px solid rgba(217, 22, 22, 0.1);
}

.percent-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.percent-track {
    flex: 1;
    height: 8px;
    background: #f1f3f5;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.percent-fill {
    height: 100%;
    background: var(--champions-red);
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Paginação Premium */
.pagination-premium {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pg-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid var(--champions-border);
    border-radius: 14px;
    color: var(--champions-text);
    font-weight: 700;
    text-decoration: none !important;
    transition: var(--transition-base);
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.pg-btn:hover:not(.disabled) {
    border-color: var(--champions-red);
    color: var(--champions-red);
    background: var(--champions-red-glow);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(217, 22, 22, 0.1);
}

.pg-btn.active {
    background: var(--champions-red);
    border-color: var(--champions-red);
    color: white !important;
    box-shadow: 0 8px 20px rgba(217, 22, 22, 0.3);
}

.pg-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f8f9fa;
}

.percent-val {
    font-weight: 800;
    font-size: 0.9rem;
    min-width: 45px;
    color: var(--champions-text);
}

/* Botão de tradução — estilo premium (compartilhado entre carta.php e heroi.php) */
.btn-traduzir-premium {
    background: linear-gradient(135deg, #1565C0 0%, #42A5F5 100%);
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.82rem;
    color: white;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.35);
    transition: var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}
.btn-traduzir-premium::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.3s ease;
}
.btn-traduzir-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(21, 101, 192, 0.45);
}
.btn-traduzir-premium:hover::before {
    background: rgba(255,255,255,0.1);
}
.btn-traduzir-premium:active { transform: translateY(0); }
.btn-traduzir-premium.traduzindo {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}
.btn-traduzir-premium.traduzido {
    background: linear-gradient(135deg, #1E8449 0%, #58D68D 100%);
    box-shadow: 0 4px 14px rgba(30, 132, 73, 0.35);
    cursor: default;
}
