/* ============================================
   SMILEY REFERRALS v2.0 - CON CÁPSULA BLANCA
   Actualizado: Cápsula elegante + UX mejorado
   ============================================ */

/* Reset y contenedor principal CON CÁPSULA */
.smiley-referral-wrapper {
    box-sizing: border-box;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
    /* CÁPSULA BLANCA ELEGANTE */
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.smiley-referral-wrapper:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.smiley-referral-wrapper *,
.smiley-referral-wrapper *::before,
.smiley-referral-wrapper *::after {
    box-sizing: border-box;
}

/* Padding interno para toda la cápsula - AUMENTADO 20px */
.smiley-referral-wrapper > * {
    padding-left: 60px;
    padding-right: 60px;
}

.smiley-referral-wrapper > *:first-child {
    padding-top: 50px;
}

.smiley-referral-wrapper > *:last-child {
    padding-bottom: 50px;
}

/* =====================
   HEADER COMPACTO
   ===================== */
.smiley-referral-header {
    background: transparent;
    border-radius: 0;
    padding: 0 0 32px 0;
    margin-bottom: 30px;
    box-shadow: none;
    text-align: center;
    border-bottom: 2px solid #f1f5f9;
}

.smiley-badge {
    display: inline-block;
    background: #ff0000;
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.smiley-referral-header h1 {
    font-size: 32px;
    color: #1a202c;
    margin: 0 0 16px 0;
    padding: 0;
    font-weight: 800;
    line-height: 1.2;
}

.smiley-highlight-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.smiley-tag {
    background: linear-gradient(135deg, #ff0000 0%, #fbbf24 50%, #33cc33 100%);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.2);
}

.smiley-intro-text {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* =====================
   FAQ ACORDEÓN - ALINEADO AL TABLERO
   ===================== */
.smiley-faq-accordion {
    background: #f8fafc;
    border-radius: 16px;
    margin-bottom: 30px;
    margin-left: 60px;
    margin-right: 60px;
    box-shadow: none;
    overflow: hidden;
    border: 2px solid #e2e8f0;
}

.smiley-faq-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.smiley-faq-toggle:hover {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}

.smiley-faq-toggle.active {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.smiley-faq-icon {
    font-size: 24px;
    line-height: 1;
}

.smiley-faq-title {
    flex: 1;
    text-align: left;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
}

.smiley-faq-arrow {
    font-size: 14px;
    color: #666666;
    transition: transform 0.3s ease;
}

.smiley-faq-toggle.active .smiley-faq-arrow {
    transform: rotate(180deg);
}

.smiley-faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.smiley-faq-content.open {
    max-height: 1500px;
}

.smiley-faq-inner {
    padding: 24px 32px 32px 32px;
    background: #ffffff;
    overflow: visible;
}

.smiley-faq-inner h3 {
    font-size: 16px;
    color: #1a202c;
    margin: 0 0 12px 0;
    padding: 0;
    font-weight: 700;
}

.smiley-faq-inner p {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 20px 0;
    padding: 0;
}

.smiley-faq-examples {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.smiley-faq-example {
    background: #fef3c7;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #fbbf24;
    font-size: 14px;
    color: #1a202c;
}

.smiley-faq-example strong {
    font-weight: 700;
}

.smiley-faq-rules {
    list-style: none;
    padding: 0;
    margin: 0;
}

.smiley-faq-rules li {
    padding: 8px 0;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

/* =====================
   TABLERO GIGANTE - PATRÓN DE ANCHO (MANTENER ORIGINAL)
   ===================== */
.smiley-board-section {
    margin-bottom: 30px;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.smiley-board-card {
    background: linear-gradient(135deg, #ff0000 0%, #fbbf24 50%, #33cc33 100%);
    border-radius: 20px;
    padding: 4px;
    box-shadow: 0 10px 40px rgba(255, 0, 0, 0.25);
    margin: 0 60px;
}

.smiley-board-card-inner {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px;
}

.smiley-board-header {
    text-align: center;
    color: #1a202c;
    margin-bottom: 24px;
}

.smiley-board-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 12px 0;
    padding: 0;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.smiley-progress-display {
    font-size: 64px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    margin: 12px 0;
    line-height: 1;
}

.smiley-board-subtitle {
    font-size: 16px;
    color: #64748b;
    font-style: italic;
    margin: 0;
    padding: 0;
}

.smiley-board-container {
    background: transparent;
    border-radius: 0;
    padding: 0;
    backdrop-filter: none;
    overflow: visible;
}

/* Números 1-12 */
.smiley-month-labels {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.smiley-month-label {
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: #1a202c;
}

/* GRID: 2 filas × 12 columnas */
.smiley-board-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(2, 1fr);
    grid-auto-flow: column;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
}

/* CUADRADOS */
.smiley-square {
    aspect-ratio: 1;
    border: 3px solid #e2e8f0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: #f9fafb;
    transition: all 0.3s ease;
    cursor: help;
    position: relative;
    color: #cbd5e0;
    font-weight: 700;
}

.smiley-square:not(.gift):not(.filled):not(.next):hover {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-color: #fbbf24;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4);
}

.smiley-square.gift {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #fbbf24;
    color: #ffffff;
    font-size: 36px;
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(251, 191, 36, 0.5);
}

.smiley-square.gift:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 40px rgba(251, 191, 36, 0.7);
    filter: brightness(1.1);
}

.smiley-square.filled {
    background: linear-gradient(135deg, #33cc33 0%, #10b981 100%);
    border-color: #33cc33;
    color: #ffffff;
    font-size: 32px;
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(51, 204, 51, 0.5);
    animation: fillSquare 0.5s ease-out;
}

.smiley-square.filled:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 12px 40px rgba(51, 204, 51, 0.7);
    filter: brightness(1.1);
}

.smiley-square.next {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 3px dashed #ff0000;
    color: #ff0000;
    font-size: 32px;
    animation: pulse 2s infinite;
}

.smiley-square.next:hover {
    transform: translateY(-6px) scale(1.12);
    box-shadow: 0 16px 50px rgba(255, 0, 0, 0.5);
    border-color: #ff0000;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

/* Tooltips - PADDING MÁS REDUCIDO para evitar corte */
.smiley-square:hover::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a202c;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    pointer-events: none;
    animation: tooltipFadeIn 0.2s ease-out;
}

.smiley-square:hover::before {
    content: '';
    position: absolute;
    bottom: 112%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1a202c;
    z-index: 1000;
    animation: tooltipFadeIn 0.2s ease-out;
}

/* Info boxes */
.smiley-info-boxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.smiley-info-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.smiley-info-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.smiley-info-emoji {
    font-size: 28px;
    margin-bottom: 8px;
    line-height: 1;
}

.smiley-info-title {
    font-size: 12px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 4px 0;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.smiley-info-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
    padding: 0;
}

/* =====================
   COMPARTIR - ALINEADO AL TABLERO
   ===================== */
.smiley-share-section {
    background: transparent;
    border-radius: 0;
    padding: 0 0 8px 0;
    margin-left: 60px;
    margin-right: 60px;
    box-shadow: none;
}

.smiley-share-section h3 {
    font-size: 24px;
    color: #1a202c;
    margin: 0 0 8px 0;
    padding: 0;
    font-weight: 700;
    text-align: center;
}

.smiley-share-desc {
    text-align: center;
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 24px 0;
    padding: 0;
}

.smiley-share-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.smiley-share-input {
    flex: 1;
    padding: 16px 20px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    color: #1a202c;
    outline: none;
    transition: all 0.3s ease;
}

.smiley-share-input:focus {
    border-color: #ff0000;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.smiley-copy-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.smiley-copy-btn:hover {
    background: linear-gradient(135deg, #33cc33 0%, #28a428 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(51, 204, 51, 0.4);
}

.smiley-copy-btn:active {
    transform: translateY(0);
}

.smiley-copy-btn.copied {
    background: linear-gradient(135deg, #33cc33 0%, #28a428 100%);
    box-shadow: 0 4px 15px rgba(51, 204, 51, 0.3);
}

.smiley-share-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.smiley-share-btn {
    padding: 16px;
    border: 2px solid;
    border-radius: 12px;
    background: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.smiley-share-btn.whatsapp {
    color: #33cc33;
    border-color: #33cc33;
    background: #f0fdf4;
}

.smiley-share-btn.whatsapp:hover {
    background: #33cc33;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(51, 204, 51, 0.3);
}

.smiley-share-btn.facebook {
    color: #1877F2;
    border-color: #1877F2;
    background: #eff6ff;
}

.smiley-share-btn.facebook:hover {
    background: #1877F2;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.3);
}

.smiley-share-btn.instagram {
    color: #E4405F;
    border-color: #E4405F;
    background: linear-gradient(135deg, #fef2f2 0%, #fce7f3 100%);
}

.smiley-share-btn.instagram:hover {
    background: linear-gradient(135deg, #E4405F 0%, #C13584 50%, #833AB4 100%);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(228, 64, 95, 0.4);
}

/* =====================
   ANIMACIONES
   ===================== */
@keyframes fillSquare {
    0% { 
        transform: scale(0.8); 
        opacity: 0; 
    }
    50% { 
        transform: scale(1.15); 
    }
    100% { 
        transform: scale(1.02); 
        opacity: 1; 
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4);
    }
    50% { 
        transform: scale(1.08); 
        box-shadow: 0 8px 24px rgba(255, 0, 0, 0.6);
    }
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

/* Animación entrada cápsula */
.smiley-referral-wrapper {
    animation: slideInUp 0.6s ease-out;
}

/* Animación cuadrados en secuencia */
.smiley-square {
    animation: slideInUp 0.4s ease-out backwards;
}

.smiley-square:nth-child(1) { animation-delay: 0.05s; }
.smiley-square:nth-child(2) { animation-delay: 0.1s; }
.smiley-square:nth-child(3) { animation-delay: 0.15s; }
.smiley-square:nth-child(4) { animation-delay: 0.2s; }
.smiley-square:nth-child(5) { animation-delay: 0.25s; }
.smiley-square:nth-child(6) { animation-delay: 0.3s; }
.smiley-square:nth-child(7) { animation-delay: 0.35s; }
.smiley-square:nth-child(8) { animation-delay: 0.4s; }
.smiley-square:nth-child(9) { animation-delay: 0.45s; }
.smiley-square:nth-child(10) { animation-delay: 0.5s; }
.smiley-square:nth-child(11) { animation-delay: 0.55s; }
.smiley-square:nth-child(12) { animation-delay: 0.6s; }
.smiley-square:nth-child(13) { animation-delay: 0.65s; }
.smiley-square:nth-child(14) { animation-delay: 0.7s; }
.smiley-square:nth-child(15) { animation-delay: 0.75s; }
.smiley-square:nth-child(16) { animation-delay: 0.8s; }
.smiley-square:nth-child(17) { animation-delay: 0.85s; }
.smiley-square:nth-child(18) { animation-delay: 0.9s; }
.smiley-square:nth-child(19) { animation-delay: 0.95s; }
.smiley-square:nth-child(20) { animation-delay: 1s; }
.smiley-square:nth-child(21) { animation-delay: 1.05s; }
.smiley-square:nth-child(22) { animation-delay: 1.1s; }
.smiley-square:nth-child(23) { animation-delay: 1.15s; }
.smiley-square:nth-child(24) { animation-delay: 1.2s; }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 968px) {
    .smiley-referral-wrapper > * {
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .smiley-referral-wrapper > *:first-child {
        padding-top: 40px;
    }
    
    .smiley-referral-wrapper > *:last-child {
        padding-bottom: 40px;
    }
    
    .smiley-board-card {
        margin: 0 40px;
    }
    
    .smiley-faq-accordion {
        margin-left: 40px;
        margin-right: 40px;
    }
    
    .smiley-share-section {
        margin-left: 40px;
        margin-right: 40px;
    }
}

@media (max-width: 768px) {
    .smiley-referral-wrapper {
        border-radius: 20px;
    }
    
    .smiley-referral-wrapper > * {
        padding-left: 25px;
        padding-right: 25px;
    }
    
    .smiley-referral-wrapper > *:first-child {
        padding-top: 25px;
    }
    
    .smiley-referral-wrapper > *:last-child {
        padding-bottom: 25px;
    }
    
    .smiley-referral-header {
        padding: 0 0 24px 0;
    }
    
    .smiley-referral-header h1 {
        font-size: 24px;
    }
    
    .smiley-board-card {
        padding: 3px;
        margin: 0 25px;
    }
    
    .smiley-faq-accordion {
        margin-left: 25px;
        margin-right: 25px;
    }
    
    .smiley-share-section {
        margin-left: 25px;
        margin-right: 25px;
    }
    
    .smiley-board-card-inner {
        padding: 24px 20px;
    }
    
    .smiley-progress-display {
        font-size: 48px;
    }
    
    .smiley-board-grid {
        gap: 5px;
    }
    
    .smiley-square {
        border-width: 2px;
        border-radius: 10px;
        font-size: 20px;
    }
    
    .smiley-square.gift {
        font-size: 26px;
    }
    
    .smiley-square.filled,
    .smiley-square.next {
        font-size: 24px;
    }
    
    .smiley-month-label {
        font-size: 13px;
    }
    
    .smiley-info-boxes {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .smiley-share-input-wrapper {
        flex-direction: column;
    }
    
    .smiley-copy-btn {
        width: 100%;
    }
    
    .smiley-share-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .smiley-referral-wrapper {
        border-radius: 16px;
    }
    
    .smiley-referral-wrapper > * {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .smiley-referral-wrapper > *:first-child {
        padding-top: 20px;
    }
    
    .smiley-referral-wrapper > *:last-child {
        padding-bottom: 20px;
    }
    
    .smiley-board-card {
        margin: 0 20px;
    }
    
    .smiley-faq-accordion {
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .smiley-share-section {
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .smiley-referral-header h1 {
        font-size: 22px;
    }
    
    .smiley-tag {
        font-size: 12px;
        padding: 6px 14px;
    }
    
    .smiley-progress-display {
        font-size: 40px;
    }
}