/* ==========================================================================
   AMIGO SECRETO - HOJA DE ESTILOS PRINCIPAL
   Temática: Amor y Amistad (Colores rosas / rose-600 / vino / dorado festivo)
   Mobile-First, Responsive, Moderno y Pulido
   ========================================================================== */

:root {
    --primary-color: #e11d48;       /* Rose-600 */
    --primary-hover: #be123c;       /* Rose-700 */
    --primary-light: #fff1f2;       /* Rose-50 */
    --primary-border: #fecdd3;      /* Rose-200 */
    --accent-color: #f43f5e;        /* Rose-500 */
    --text-dark: #1e293b;           /* Slate-800 */
    --text-muted: #64748b;          /* Slate-500 */
    --bg-page: #f8fafc;             /* Slate-50 */
    --card-bg: #ffffff;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
}

/* --------------------------------------------------------------------------
   NAVBAR PRINCIPAL
   -------------------------------------------------------------------------- */
.main-navbar {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    margin-bottom: 25px;
    padding: 5px 0;
}

.brand-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--primary-color) !important;
    display: inline-block;
    padding-top: 12px;
}

.brand-heart {
    display: inline-block;
    animation: heartBeat 1.8s infinite;
    margin-right: 5px;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.2); }
    28% { transform: scale(1); }
    42% { transform: scale(1.2); }
    70% { transform: scale(1); }
}

.badge-role {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    padding: 3px 6px;
    margin-left: 5px;
    border-radius: 4px;
}

/* --------------------------------------------------------------------------
   BOTONES Y ELEMENTOS DE ACCIÓN
   -------------------------------------------------------------------------- */
.btn-rose {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}

.btn-rose:hover, .btn-rose:focus, .btn-rose:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
}

.text-rose {
    color: var(--primary-color) !important;
}

/* --------------------------------------------------------------------------
   PANELES Y TARJETAS
   -------------------------------------------------------------------------- */
.custom-panel {
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    margin-bottom: 25px;
}

.custom-panel .panel-heading {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 20px;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.custom-panel .panel-body {
    padding: 20px;
}

/* --------------------------------------------------------------------------
   MÉTRICAS RÁPIDAS
   -------------------------------------------------------------------------- */
.metric-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.metric-num {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 5px;
}

.metric-card-success .metric-num { color: #059669; }
.metric-card-warning .metric-num { color: #d97706; }
.metric-card-info .metric-num { color: #0284c7; }

/* --------------------------------------------------------------------------
   CABECERA DEL JUEGO (BANNER)
   -------------------------------------------------------------------------- */
.game-header-banner {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 25px;
    border: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

.game-title-wrap {
    display: table;
    width: 100%;
}

.game-emoji {
    display: table-cell;
    vertical-align: middle;
    font-size: 42px;
    width: 55px;
    padding-right: 15px;
}

.game-title-details {
    display: table-cell;
    vertical-align: middle;
}

.game-title {
    margin: 0 0 5px 0;
    font-size: 26px;
    font-weight: 700;
}

.game-meta {
    margin: 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   BADGES DE ESTADO
   -------------------------------------------------------------------------- */
.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.badge-inscripciones_abiertas { background-color: #dcfce7 !important; color: #166534 !important; }
.badge-inscripciones_cerradas { background-color: #fef3c7 !important; color: #92400e !important; }
.badge-listo_para_sorteo      { background-color: #e0f2fe !important; color: #075985 !important; }
.badge-sorteado               { background-color: #ffe4e6 !important; color: #9f1239 !important; }
.badge-finalizado             { background-color: #f1f5f9 !important; color: #475569 !important; }
.badge-cancelado              { background-color: #fee2e2 !important; color: #991b1b !important; }

/* --------------------------------------------------------------------------
   AUTENTICACIÓN
   -------------------------------------------------------------------------- */
.auth-body {
    background: linear-gradient(135deg, #fff1f2 0%, #fef2f2 100%);
    min-height: 100vh;
}

.auth-wrapper {
    margin-top: 50px;
    margin-bottom: 50px;
}

.auth-logo-box {
    margin-bottom: 25px;
}

.auth-title {
    font-size: 32px;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 5px;
}

.auth-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 35px 30px;
    border: 1px solid #fecdd3;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   ÁREA DEL PARTICIPANTE Y CAJA DE REGALO INTERACTIVA
   -------------------------------------------------------------------------- */
.participant-body {
    background: #fdf2f4;
    min-height: 100vh;
}

.participant-header {
    background: #ffffff;
    padding: 15px 0;
    border-bottom: 1px solid #fecdd3;
}

.participant-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color);
}

.participant-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 35px 25px;
    margin-top: 20px;
    margin-bottom: 30px;
    border: 1px solid #fecdd3;
}

.participant-avatar {
    font-size: 54px;
    display: inline-block;
    margin-bottom: 10px;
}

.event-info-box {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-top: 15px;
}

.info-label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.info-val {
    font-size: 16px;
    color: var(--primary-color);
}

/* Animación de la Caja de Regalo (CSS puro interactivo) */
.gift-box-wrapper {
    cursor: pointer;
    display: inline-block;
    padding: 20px;
    transition: transform 0.2s ease;
}

.gift-box-wrapper:hover {
    transform: scale(1.04);
}

.gift-animation-container {
    position: relative;
    width: 130px;
    height: 120px;
    margin: 0 auto;
}

.gift-box-body {
    position: absolute;
    bottom: 0;
    left: 15px;
    width: 100px;
    height: 80px;
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    border-radius: 6px;
    box-shadow: 0 8px 15px rgba(225, 29, 72, 0.3);
}

.gift-lid {
    position: absolute;
    top: 25px;
    left: 5px;
    width: 120px;
    height: 25px;
    background: #f43f5e;
    border-radius: 6px;
    z-index: 2;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.gift-ribbon {
    position: absolute;
    top: 5px;
    left: 55px;
    width: 20px;
    height: 115px;
    background: #fbbf24; /* Dorado festivo */
    z-index: 3;
    border-radius: 2px;
}

/* Efecto cuando se activa la apertura */
.gift-opening .gift-lid {
    transform: translateY(-50px) rotate(-15deg);
}

.btn-discover-pulse {
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.6); }
    70% { box-shadow: 0 0 0 16px rgba(225, 29, 72, 0); }
    100% { box-shadow: 0 0 0 0 rgba(225, 29, 72, 0); }
}

/* --------------------------------------------------------------------------
   TABLAS RESPONSIVAS Y UTILIDADES
   -------------------------------------------------------------------------- */
.custom-table > thead > tr > th {
    border-bottom: 2px solid #f1f5f9;
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 600;
}

.custom-table > tbody > tr > td {
    padding: 14px 10px;
    border-top: 1px solid #f8fafc;
    vertical-align: middle !important;
}

.btn-group-responsive {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-group-responsive > * {
    margin-bottom: 5px;
}

.copy-link-input {
    background-color: #f8fafc;
    cursor: text;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.main-footer {
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
}

/* --------------------------------------------------------------------------
   ADAPTACIÓN MOBILE (320px - 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .page-title {
        font-size: 22px;
    }

    .game-title-wrap {
        display: block;
        text-align: center;
    }

    .game-emoji {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        padding-right: 0;
    }

    .game-title-details {
        display: block;
    }

    .header-actions {
        text-align: center !important;
        margin-top: 15px;
    }

    .auth-card {
        padding: 25px 18px;
    }

    .participant-card {
        padding: 20px 15px;
    }

    .revealed-name {
        font-size: 28px !important;
    }

    .btn-group-responsive {
        flex-direction: column;
    }

    .btn-group-responsive .btn {
        width: 100%;
        display: block;
        margin-bottom: 8px;
    }
}
