/* ==========================================================================
   PUEBLO MÁGICO DE SISAL - SISTEMA DE DISEÑO INTERACTIVO & GAMIFICADO
   H. Ayuntamiento de Hunucmá - Dirección de Turismo
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@500;700;800&display=swap');

:root {
    --primary: #00A896;
    --primary-dark: #0077B6;
    --ocean-deep: #023E8A;
    --sea-foam: #028090;
    --accent-gold: #FFB703;
    --accent-coral: #F77F00;
    --light-sand: #F8F9FA;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --card-bg: rgba(255, 255, 255, 0.95);
    --glass-border: rgba(255, 255, 255, 0.3);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --shadow-main: 0 20px 40px -15px rgba(2, 62, 138, 0.25);
    --shadow-glow: 0 10px 25px rgba(0, 168, 150, 0.3);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: linear-gradient(135deg, #021B2B 0%, #004D5A 40%, #0077B6 80%, #00B4D8 100%);
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 15px;
    position: relative;
    overflow-x: hidden;
}

/* Background Tropical Elements */
body::before {
    content: '';
    position: fixed;
    top: -10%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 183, 3, 0.15) 0%, rgba(255,183,3,0) 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(0, 168, 150, 0.2) 0%, rgba(0,168,150,0) 70%);
    pointer-events: none;
    z-index: 0;
}

.app-container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Header & Branding */
.brand-header {
    text-align: center;
    color: #ffffff;
    margin-bottom: 24px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--accent-gold);
    margin-bottom: 12px;
}

.brand-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background: linear-gradient(180deg, #FFFFFF 0%, #E0F2FE 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 6px;
    font-weight: 500;
}

/* Main Card Container */
.main-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
    border: 1px solid var(--glass-border);
    padding: 32px 28px;
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

@media (max-width: 576px) {
    .main-card {
        padding: 24px 18px;
        border-radius: 20px;
    }
    .brand-title {
        font-size: 1.75rem;
    }
}

/* Progress Header */
.progress-wrapper {
    margin-bottom: 28px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--sea-foam);
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: #E2E8F0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent-gold) 100%);
    border-radius: 20px;
    transition: width 0.4s ease;
}

/* Screen Sections */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Welcome Screen */
.welcome-hero {
    text-align: center;
    padding: 10px 0;
}

.welcome-icon-box {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-coral) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    box-shadow: 0 12px 24px rgba(247, 127, 0, 0.35);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.welcome-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ocean-deep);
    margin-bottom: 12px;
}

.welcome-text {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 24px;
}

.feature-pills {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.pill-tag {
    background: #E0F2FE;
    color: var(--ocean-deep);
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Buttons */
.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--sea-foam) 100%);
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 168, 150, 0.45);
    background: linear-gradient(135deg, #00BCA8 0%, #0294A5 100%);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #F1F5F9;
    color: var(--text-dark);
    border: 1px solid #CBD5E1;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: #E2E8F0;
}

/* Question Header */
.q-number {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.q-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--ocean-deep);
    margin-bottom: 20px;
    line-height: 1.35;
}

/* Options Grid / Cards */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.options-grid.single-col {
    grid-template-columns: 1fr;
}

.opt-card {
    background: #FFFFFF;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
    user-select: none;
    position: relative;
}

.opt-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 168, 150, 0.12);
}

.opt-card.selected {
    border-color: var(--primary);
    background: #F0FDF4;
    box-shadow: 0 8px 20px rgba(0, 168, 150, 0.18);
}

.opt-card .opt-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.opt-card .opt-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    flex-grow: 1;
}

.opt-card .opt-check {
    width: 22px;
    height: 22px;
    border: 2px solid #CBD5E1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.opt-card.selected .opt-check {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.opt-card.selected .opt-check::after {
    content: '✓';
    font-size: 0.8rem;
    font-weight: bold;
}

/* Custom Text Inputs */
.text-input-box {
    margin-top: 12px;
}

.text-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #CBD5E1;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.text-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 168, 150, 0.15);
}

/* Star Rating Widget */
.stars-container {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 30px;
}

.star-btn {
    background: none;
    border: none;
    font-size: 2.8rem;
    cursor: pointer;
    filter: grayscale(100%);
    opacity: 0.4;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.2s, opacity 0.2s;
}

.star-btn:hover, .star-btn.active {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.15);
}

/* NPS Scale Widget (0-10) */
.nps-scale {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 6px;
    margin: 20px 0 10px;
}

@media (max-width: 576px) {
    .nps-scale {
        grid-template-columns: repeat(6, 1fr);
    }
}

.nps-btn {
    background: #FFFFFF;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-sm);
    padding: 12px 0;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.nps-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.nps-btn.selected {
    background: var(--ocean-deep);
    color: white;
    border-color: var(--ocean-deep);
    box-shadow: 0 6px 14px rgba(2, 62, 138, 0.3);
}

.nps-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 24px;
}

/* Action Controls (Prev / Next) */
.nav-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    gap: 12px;
}

/* SCRATCH CARD GAME SECTION */
.scratch-hero {
    text-align: center;
}

.scratch-header-badge {
    display: inline-block;
    background: #FEF3C7;
    color: #92400E;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 12px;
}

.scratch-card-wrapper {
    position: relative;
    width: 100%;
    max-width: 440px;
    margin: 20px auto;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
    border: 4px solid var(--accent-gold);
    background: #FFFFFF;
}

/* Prize content revealed under canvas */
.scratch-underlayer {
    padding: 28px 20px;
    text-align: center;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFFBEB 100%);
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scratch-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    touch-action: none;
    z-index: 5;
    transition: opacity 0.5s ease;
}

.prize-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.prize-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ocean-deep);
    margin-bottom: 8px;
}

.prize-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 14px;
}

.prize-code-badge {
    background: var(--ocean-deep);
    color: var(--accent-gold);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-family: monospace;
    font-size: 1.1rem;
    letter-spacing: 1px;
    display: inline-block;
}

/* Explorer Profile Badge Card */
.profile-badge-card {
    background: linear-gradient(135deg, #023E8A 0%, #0077B6 100%);
    color: white;
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    margin-top: 24px;
    box-shadow: 0 12px 28px rgba(2, 62, 138, 0.3);
    position: relative;
    overflow: hidden;
}

.profile-badge-card::after {
    content: 'SISAL PUEBLO MÁGICO';
    position: absolute;
    bottom: -15px;
    right: -10px;
    font-size: 2.5rem;
    font-weight: 900;
    opacity: 0.06;
    pointer-events: none;
}

.badge-tagline {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-gold);
    font-weight: 700;
}

.badge-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 8px 0 10px;
}

.badge-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
}

/* Footer */
.app-footer {
    text-align: center;
    margin-top: 24px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.app-footer a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

/* ==========================================================================
   BOTÓN DE CABECERA, TARJETA SOCIAL Y MODAL QR
   ========================================================================== */

/* Botón de Compartir en Cabecera */
.share-header-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #FFFFFF;
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all 0.25 ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.share-header-btn:hover {
    background: #FFFFFF;
    color: var(--ocean-deep);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* Tarjeta de Compartir en Resultados */
.share-results-card {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 1px solid #BAE6FD;
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 24px;
    text-align: left;
    box-shadow: 0 6px 20px rgba(2, 62, 138, 0.05);
}

.share-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ocean-deep);
    margin-bottom: 4px;
}

.share-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.share-content-flex {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.qr-box {
    background: #FFFFFF;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid #CBD5E1;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.qr-img-mini {
    width: 130px;
    height: 130px;
    object-fit: contain;
    border-radius: 8px;
}

.qr-hint {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sea-foam);
    margin-top: 6px;
}

.social-share-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.btn-share-social {
    width: 100%;
    padding: 11px 16px;
    border-radius: 12px;
    border: none;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.btn-share-social:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.btn-share-social.whatsapp {
    background: #25D366;
}

.btn-share-social.facebook {
    background: #1877F2;
}

.btn-share-social.twitter {
    background: #0F1419;
}

.btn-share-social.copy {
    background: var(--sea-foam);
}

/* Modal de Código QR */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 27, 43, 0.75);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 30px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: popUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal-close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: #F1F5F9;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.4rem;
    color: #64748B;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--ocean-deep);
    margin: 8px 0 4px;
}

.modal-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.modal-qr-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
}

.modal-qr-frame {
    background: #FFFFFF;
    padding: 16px;
    border-radius: 20px;
    border: 2px solid #E0F2FE;
    box-shadow: 0 8px 24px rgba(2, 62, 138, 0.12);
}

.modal-qr-img {
    width: 210px;
    height: 210px;
    object-fit: contain;
    display: block;
}

.modal-qr-url {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 12px;
    word-break: break-all;
    background: #F8FAFC;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

.modal-share-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

