:root {
    /* Paleta de Colores Premium / Dark Mode */
    --color-background: #0b0f19;
    --color-surface: #1a1a1a;
    --color-surface-hover: #252525;

    --color-primary: #D4AF37;
    --color-primary-hover: #F2C94C;

    --color-secondary: #2E7D32;
    --color-secondary-hover: #43A047;

    --color-text-main: #e0e0e0;
    --color-text-muted: #B0B0B0;
    --color-border: #333333;

    --bg-card: rgba(20, 20, 20, 0.7);
    --font-family-main: 'Outfit', 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-background);
    color: var(--color-text-main);
    font-family: var(--font-family-main);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

#app {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Bootstrap Overrides & Custom Styles --- */

.navbar-brand {
    font-weight: bold;
    color: #f2b220 !important;
}

/* Fix 2: Tarjetas más redondeadas y largas */
.group-card {
    transition: all 0.3s;
    border-radius: 2rem !important;
    /* Más redondeado */
    background: linear-gradient(145deg, #1e2225, #16191c) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    min-height: 700px;
    /* Hacerlas largas */
    margin-bottom: 2rem;
}

.group-card:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 202, 240, 0.4) !important;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5) !important;
}

/* Fix 1: Badges/Botones superiores más grandes */
.badge-custom {
    font-size: 1rem !important;
    /* Texto más grande */
    padding: 0.6rem 1.25rem !important;
    /* Padding más generoso */
    border-radius: 50rem !important;
    /* Pill shape */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Fix 4: Encabezado de tabla en fondo negro */
.table-header-custom th {
    background-color: #000000 !important;
    color: #6c757d !important;
    border-bottom: 1px solid #333;
    font-size: 0.75rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.table-dark {
    background-color: transparent;
    --bs-table-bg: transparent;
}

/* Animation */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-pulse {
    animation: pulse 1.5s infinite;
}

.tracking-wide {
    letter-spacing: 0.1em;
}

.x-small {
    font-size: 0.75rem;
}

/* Scrollbar para la tabla */
.table-responsive::-webkit-scrollbar {
    width: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- Sistema de Popovers Premium --- */
.custom-popover {
    position: fixed;
    /* Obligatorio para tu lógica JS actual */
    z-index: 10000;
    /* Por encima de todo, incluido el header */
    background: rgba(20, 20, 23, 0.95);
    /* Fondo oscuro casi sólido */
    backdrop-filter: blur(8px);
    /* Efecto cristal */
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Borde sutil */
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    max-width: 250px;
    pointer-events: none;
    /* Crucial: evita que el tooltip parpadee si el mouse pasa sobre él */
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(5px);
}

.custom-popover.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Triangulito decorativo (Opcional) */
.custom-popover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: rgba(20, 20, 23, 0.95) transparent transparent transparent;
}

/* --- Botón de Compartir (Integrado en el Header) --- */
.btn-share-header {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
}

.btn-share-header:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    border-color: rgba(237, 218, 43, 0.3);
    color: #edda2b;
}

.btn-share-header:active {
    transform: translateY(0) scale(0.95);
}

.btn-share-header .material-symbols-outlined {
    font-size: 20px;
    font-variation-settings: 'FILL' 0, 'wght' 400;
}

/* --- Toast de Confirmación --- */
.share-toast {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    z-index: 10000;
    background: rgba(30, 34, 37, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(237, 218, 43, 0.3);
    color: #fff;
    padding: 12px 20px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.share-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.share-toast .material-symbols-outlined {
    color: #4ade80;
    font-size: 20px;
}