/* =====================================
   MODO BESTIA
   GLOBAL TOKENS + BASE
===================================== */

:root {

    --bestia-primary:#F3BA60;
    --bestia-secondary:#E0DBF3;
    --bestia-background:#F6F6F6;
    --bestia-surface:#FFFFFF;
    --bestia-text:#202022;
    --bestia-muted:#736A6A;
    --bestia-soft:#B6B1C0;
    --bestia-success:#28a745;
    --bestia-warning:#f0ad4e;
    --bestia-danger:#dc3545;
    --bestia-info:#0dcaf0;
    --bestia-coach:#2f2a3d;
    --bestia-xp:#202022;
    --bestia-level:#F3BA60;

    --bestia-red:#dc3545;
    --bestia-gold:#F3BA60;

    --space-1:8px;
    --space-2:16px;
    --space-3:24px;
    --space-4:32px;
    --space-5:40px;

}

* {

    box-sizing:border-box;

}

html {

    scroll-behavior:smooth;
    overflow-x:hidden;

}

body {

    margin:0;
    background:var(--bestia-background);
    color:var(--bestia-text);
    font-family:'Inter', 'Segoe UI', sans-serif;
    padding-bottom:0;
    -webkit-tap-highlight-color:transparent;
    width:100%;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    text-rendering:optimizeLegibility;
    line-height:1.6;

}

h1, h2, h3, h4, h5, h6, .hero-rank, .hero-level, .stat-card h2 {

    font-family:'Onest', 'Inter', 'Segoe UI', sans-serif;
    font-weight:800;
    letter-spacing:-0.02em;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;

}

img, svg {

    max-width:100%;
    display:block;

}

h1, h2, h3, h4, h5, h6 {

    margin-top:0;

}

p {

    color:var(--bestia-muted);
    line-height:1.65;

}

.page-title {

    font-size:clamp(2rem, 5vw, 3rem);
    font-weight:800;
    letter-spacing:-0.03em;

}

@media (max-width:991px) {
    .hero-header {
        flex-wrap: wrap !important;
    }
    .hero-header > div:first-child {
        margin-right: 0 !important;
        margin-bottom: 16px;
    }
}

@media (max-width:767px) {
    .hero-header > div:first-child {
        margin: 0 auto 16px;
    }
    .hero-header > div:last-child {
        text-align: center;
        width: 100%;
    }
}

@media (max-width:575px) {
    .hero-header img.rounded-circle {
        width: 80px !important;
        height: 80px !important;
    }
}

/* ─── Smooth card reveal on page load ─── */
@keyframes cardFadeIn {
    from {
        opacity:0;
        transform:translateY(20px) scale(.98);
    }
    to {
        opacity:1;
        transform:translateY(0) scale(1);
    }
}
.dashboard-fade-in > div {
    animation:cardFadeIn .45s ease both;
}
.dashboard-fade-in > div:nth-child(1) { animation-delay:0s; }
.dashboard-fade-in > div:nth-child(2) { animation-delay:.06s; }
.dashboard-fade-in > div:nth-child(3) { animation-delay:.12s; }
.dashboard-fade-in > div:nth-child(4) { animation-delay:.18s; }
.dashboard-fade-in > div:nth-child(5) { animation-delay:.24s; }
.dashboard-fade-in > div:nth-child(6) { animation-delay:.30s; }
.dashboard-fade-in > div:nth-child(7) { animation-delay:.36s; }

@media (max-width:768px) {

    .page-title {

        font-size:1.75rem;

    }

    body {
        line-height:1.55;
    }

}

/* ─── Perfil responsive ── */
@media (max-width: 575px) {
    .card-body img.rounded-circle[width="160"],
    .card-body .rounded-circle[style*="width:160px"] {
        width: 100px !important;
        height: 100px !important;
        font-size: 40px !important;
    }
}

/* ─── Dashboard hero fallback avatar responsive ── */
@media (max-width: 575px) {
    .hero-header .rounded-circle.bg-light {
        width: 80px !important;
        height: 80px !important;
        font-size: 30px !important;
    }
}

/* ─── Card padding responsive ── */
@media (max-width: 575px) {
    .card-body.p-4 {
        padding: 1.25rem !important;
    }
}

/* ─── Stat cards compactos en móvil ── */
@media (max-width: 575px) {
    .stat-card {
        padding: 14px !important;
    }
    .stat-card h2 {
        font-size: 1.2rem !important;
        margin-bottom: 6px !important;
    }
    .stat-card p {
        font-size: .82rem !important;
    }
    .plan-card {
        padding: 16px !important;
    }
    .plan-card h3 {
        font-size: 1rem !important;
    }
    .action-card {
        padding: 14px !important;
    }
    .action-icon {
        font-size: 2rem !important;
        margin-bottom: 6px !important;
    }
    .action-card h5 {
        font-size: .8rem !important;
    }
}

/* ── SPA loading state ── */
.spa-loading {
    opacity:.5;
    transition:opacity .2s ease;
    pointer-events:none;
}

/* ── Global utility: smooth transitions on interactive elements ── */
a, button, .btn, .nav-link, .card, .stat-card, .plan-card, .action-card {
    -webkit-tap-highlight-color:transparent;
}

/* ── Smoother scrollbar for webkit browsers ── */
::-webkit-scrollbar {
    width:6px;
    height:6px;
}
::-webkit-scrollbar-track {
    background:transparent;
}
::-webkit-scrollbar-thumb {
    background:rgba(32,32,34,.15);
    border-radius:3px;
}
::-webkit-scrollbar-thumb:hover {
    background:rgba(32,32,34,.25);
}

/* ── Selection color ── */
::selection {
    background:rgba(243,186,96,.3);
    color:var(--bestia-text);
}

/* ── Auth Divider (Google OAuth) ── */
.mbuf-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.mbuf-auth-divider::before,
.mbuf-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}
.mbuf-auth-divider span {
    color: #888;
    font-size: 0.85rem;
    white-space: nowrap;
    font-weight:600;
}

/* ── Smooth table rows ── */
.table tbody tr {
    transition:background .2s ease;
}
.table tbody tr:hover {
    background:rgba(243,186,96,.06);
}

/* ── Alert smoothness ── */
.alert {
    border-radius:16px;
    border:none;
    box-shadow:0 4px 15px rgba(0,0,0,.06);
}

/* ── Form inputs global smoothness ── */
.form-control, .form-select {
    border-radius:12px;
    transition:border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus, .form-select:focus {
    border-color:var(--bestia-primary);
    box-shadow:0 0 0 .18rem rgba(243,186,96,.2);
}

/* ── Modal smoothness ── */
.modal-content {
    border:none;
    border-radius:20px;
    box-shadow:0 25px 80px rgba(0,0,0,.2);
}

/* ── Responsive padding improvements ── */
@media (max-width:575px) {
    .container.py-4,
    .container.py-5 {

        padding-left:12px;
        padding-right:12px;

    }
}

/* ── Google Login Button ── */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid #ddd;
    background: #fff;
    color: #444;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(.22,1,.36,1);
    font-weight: 500;
    -webkit-font-smoothing:antialiased;
}
.btn-google:hover {
    border-color: #4285F4;
    color: #4285F4;
    background: #f8fbff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66,133,244,0.18);
}
.btn-google:active {
    transform: translateY(0);
}
.btn-google i {
    font-size: 1.2rem;
    line-height:1;
}


