/* Meu Main + Mais Jogado — shared tool pages */

.ct-page {
    --ct-text: #3a4550;
    --ct-heading: #1a2129;
    --ct-muted: #6b7785;
    --ct-surface: #ffffff;
    --ct-surface-2: #f4f6f8;
    --ct-border: #dde3ea;
    --ct-input: #ffffff;
    --ct-hover: #eef1f4;
    --ct-deep: #e8ecf1;
    --ct-shadow: rgba(0, 0, 0, 0.08);
    --ct-stat-bg: rgba(255, 255, 255, 0.9);
    --ct-chip: #d0d7de;
    --ct-btn-hover: #e8ecf1;
    --ct-hero-overlay:
        linear-gradient(100deg, rgba(247, 249, 251, 0.96) 0%, rgba(247, 249, 251, 0.78) 48%, rgba(247, 249, 251, 0.45) 100%),
        radial-gradient(ellipse at 70% 40%, rgba(249, 155, 29, 0.12), transparent 55%);
    padding-bottom: 48px;
    color: var(--ct-text);
}

html[data-theme="dark"] .ct-page {
    --ct-text: #c8d0d8;
    --ct-heading: #e8ecef;
    --ct-muted: #9aa7b5;
    --ct-surface: #151b22;
    --ct-surface-2: #1a222b;
    --ct-border: #2a3440;
    --ct-input: #0e1217;
    --ct-hover: #1f2730;
    --ct-deep: #0e1217;
    --ct-shadow: rgba(0, 0, 0, 0.35);
    --ct-stat-bg: rgba(21, 27, 34, 0.85);
    --ct-chip: #d7dee5;
    --ct-btn-hover: #24303c;
    --ct-hero-overlay:
        linear-gradient(100deg, rgba(14, 18, 23, 0.96) 0%, rgba(14, 18, 23, 0.72) 48%, rgba(14, 18, 23, 0.4) 100%),
        radial-gradient(ellipse at 70% 40%, rgba(249, 155, 29, 0.18), transparent 55%);
}

.ct-page .container {
    max-width: 960px;
}

.ct-page .wcontainer {
    background: var(--ct-surface) !important;
    color: var(--ct-text) !important;
    border-color: var(--ct-border) !important;
}

.ct-intro {
    margin: 0 0 14px;
    color: var(--ct-muted);
    line-height: 1.55;
}

.ct-search {
    animation: ct-fade-up 0.45s ease both;
}

.ct-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--ct-muted);
}

.ct-loading-orb {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid rgba(249, 155, 29, 0.2);
    border-top-color: #f99b1d;
    animation: ct-spin 0.8s linear infinite;
}

.ct-empty {
    text-align: center;
    padding: 28px 16px;
    color: var(--ct-muted);
}

.ct-empty strong {
    color: var(--ct-heading);
}

/* —— Hero showcase —— */
.ct-hero {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid var(--ct-border);
    background: var(--ct-deep);
    min-height: 280px;
    margin-top: 16px;
    animation: ct-fade-up 0.55s ease both;
}

.ct-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    transform: scale(1.06);
    animation: ct-kenburns 14s ease-in-out alternate infinite;
    opacity: 0.45;
}

.ct-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ct-hero-overlay);
}

.ct-hero-body {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    align-items: center;
    padding: 28px 24px;
}

.ct-hero-portrait {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #f99b1d;
    box-shadow:
        0 0 0 6px rgba(249, 155, 29, 0.12),
        0 12px 28px rgba(0, 0, 0, 0.45);
    object-fit: cover;
    animation: ct-portrait-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ct-hero-ring {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 1px solid rgba(249, 155, 29, 0.35);
    animation: ct-pulse-ring 2.4s ease-out infinite;
    pointer-events: none;
}

.ct-hero-kicker {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #f99b1d;
    animation: ct-fade-up 0.5s ease 0.1s both;
}

.ct-hero-title {
    margin: 6px 0 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--ct-heading);
    letter-spacing: 0.02em;
    animation: ct-fade-up 0.55s ease 0.15s both;
}

.ct-hero-sub {
    margin: 6px 0 0;
    color: var(--ct-muted);
    animation: ct-fade-up 0.55s ease 0.2s both;
}

.ct-hero-actions {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    animation: ct-fade-up 0.55s ease 0.28s both;
}

.ct-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid var(--ct-border);
    background: var(--ct-hover);
    color: var(--ct-heading) !important;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.ct-btn:hover {
    transform: translateY(-1px);
    border-color: #f99b1d;
    background: var(--ct-btn-hover);
}

.ct-btn--accent {
    background: #f99b1d;
    border-color: #f99b1d;
    color: #111 !important;
}

.ct-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    position: relative;
    z-index: 1;
    padding: 0 24px 24px;
}

.ct-stat {
    background: var(--ct-stat-bg);
    border: 1px solid var(--ct-border);
    border-radius: 10px;
    padding: 14px 12px;
    text-align: center;
    animation: ct-pop 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ct-stat:nth-child(1) { animation-delay: 0.18s; }
.ct-stat:nth-child(2) { animation-delay: 0.26s; }
.ct-stat:nth-child(3) { animation-delay: 0.34s; }
.ct-stat:nth-child(4) { animation-delay: 0.42s; }

.ct-stat strong {
    display: block;
    font-size: 1.25rem;
    color: var(--ct-heading);
    font-weight: 800;
}

.ct-stat span {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ct-muted);
}

/* —— Rank list —— */
.ct-section {
    margin-top: 22px;
    animation: ct-fade-up 0.5s ease 0.25s both;
}

.ct-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.ct-section-head h3 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--ct-heading);
    font-weight: 800;
}

.ct-section-head p {
    margin: 0;
    color: var(--ct-muted);
    font-size: 0.88rem;
}

.ct-rank {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ct-rank-item {
    display: grid;
    grid-template-columns: 40px 48px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--ct-border);
    background: var(--ct-surface);
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
    animation: ct-slide-in 0.45s ease both;
}

.ct-rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(249, 155, 29, 0.45);
    background: var(--ct-surface-2);
}

.ct-rank-pos {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--ct-muted);
    text-align: center;
}

.ct-rank-item.is-top .ct-rank-pos {
    color: #f99b1d;
}

.ct-rank-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--ct-border);
    object-fit: cover;
}

.ct-rank-meta strong {
    display: block;
    color: var(--ct-heading);
    font-size: 0.98rem;
}

.ct-rank-meta span {
    display: block;
    margin-top: 2px;
    color: var(--ct-muted);
    font-size: 0.82rem;
}

.ct-rank-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.ct-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--ct-hover);
    border: 1px solid var(--ct-border);
    color: var(--ct-chip);
    font-size: 0.78rem;
    font-weight: 700;
}

.ct-chip--hot {
    border-color: rgba(249, 155, 29, 0.4);
    color: #f99b1d;
}

.ct-bar {
    margin-top: 8px;
    height: 4px;
    border-radius: 999px;
    background: var(--ct-hover);
    overflow: hidden;
}

.ct-bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #e0043f, #f99b1d);
    transform-origin: left center;
    animation: ct-bar-fill 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* —— Podium (Mais Jogado) —— */
.ct-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
    align-items: end;
}

.ct-podium-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--ct-border);
    background: var(--ct-surface);
    text-align: center;
    padding: 18px 12px 16px;
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.2s ease, border-color 0.2s ease;
    animation: ct-pop 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ct-podium-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 155, 29, 0.5);
}

.ct-podium-card.is-1 {
    padding-top: 28px;
    border-color: rgba(249, 155, 29, 0.55);
    box-shadow: 0 12px 30px rgba(249, 155, 29, 0.12);
    animation-delay: 0.08s;
}

.ct-podium-card.is-2 { animation-delay: 0.16s; }
.ct-podium-card.is-3 { animation-delay: 0.24s; }

.ct-podium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: var(--ct-hover);
    color: var(--ct-muted);
}

.ct-podium-card.is-1 .ct-podium-badge {
    background: #f99b1d;
    color: #111;
}

.ct-podium-icon {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    border: 2px solid var(--ct-border);
    object-fit: cover;
}

.ct-podium-card.is-1 .ct-podium-icon {
    width: 88px;
    height: 88px;
    border-color: #f99b1d;
}

.ct-podium-card h3 {
    margin: 10px 0 0;
    font-size: 1rem;
    color: var(--ct-heading);
}

.ct-podium-card p {
    margin: 4px 0 0;
    color: var(--ct-muted);
    font-size: 0.82rem;
}

.ct-player-tag {
    margin: 16px 0 0;
    color: #f99b1d;
    font-weight: 700;
    animation: ct-fade-up 0.45s ease both;
}

.ct-podium--runners {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 14px;
}

@media (max-width: 720px) {
    .ct-hero-body {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    .ct-hero-actions {
        justify-content: center;
    }

    .ct-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ct-rank-item {
        grid-template-columns: 28px 40px minmax(0, 1fr);
    }

    .ct-rank-metrics {
        grid-column: 2 / -1;
        justify-content: flex-start;
        padding-left: 52px;
    }

    .ct-podium,
    .ct-podium--runners {
        grid-template-columns: 1fr;
    }

    .ct-podium-card.is-1 { order: -1; }
}

@keyframes ct-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ct-slide-in {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes ct-pop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes ct-portrait-in {
    from { opacity: 0; transform: scale(0.7); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes ct-pulse-ring {
    0% { transform: scale(0.92); opacity: 0.7; }
    100% { transform: scale(1.2); opacity: 0; }
}

@keyframes ct-kenburns {
    from { transform: scale(1.04); }
    to { transform: scale(1.12); }
}

@keyframes ct-spin {
    to { transform: rotate(360deg); }
}

@keyframes ct-bar-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
    .ct-hero,
    .ct-hero-bg,
    .ct-hero-portrait,
    .ct-hero-ring,
    .ct-stat,
    .ct-rank-item,
    .ct-podium-card,
    .ct-bar > i,
    .ct-search,
    .ct-section,
    .ct-player-tag,
    .ct-loading-orb {
        animation: none !important;
    }
}
