/* Holmo style module: 08-gift-game.css */
/* Regalo interactivo: rasca y gana, pensado para dedo, mouse, lápiz y teclado. */
.shell-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 17, 15, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 150;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.shell-modal-overlay.active { display: flex; }
.shell-modal-card {
    background: var(--bg-color);
    border: 1px solid #12110f;
    border-radius: 16px;
    width: 100%;
    max-width: 430px;
    max-height: min(760px, 92vh);
    padding: 24px 18px 20px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: shellPop 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    overflow-y: auto;
    overscroll-behavior: contain;
}
@keyframes shellPop {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.shell-badge {
    display: inline-block;
    background: #12110f;
    color: #b89758;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
}
.shell-title {
    font-family: var(--font-title);
    font-size: 24px;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #12110f;
    line-height: 1.15;
}
.shell-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin: 4px 0 14px;
}
.shell-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 44px;
    min-height: 44px;
    display: grid;
    place-items: center;
    background: none;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
}
.shell-close-btn:hover,
.shell-close-btn:focus-visible { background: rgba(18, 17, 15, 0.08); }

/* Tarjeta: el premio siempre existe debajo de la capa, así el gesto se siente inmediato. */
.scratch-card-wrap {
    position: relative;
    width: 100%;
    max-width: 360px;
    min-height: 190px;
    aspect-ratio: 1.82;
    margin: 8px auto 12px;
    overflow: hidden;
    border-radius: 16px;
    background: #f8f2e5;
    box-shadow: 0 10px 24px rgba(18, 17, 15, 0.18), inset 0 0 0 1px rgba(18, 17, 15, 0.14);
    cursor: crosshair;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}
.scratch-card-prize {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    overflow: hidden;
    color: #12110f;
    background:
        radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.96) 0 9%, transparent 36%),
        linear-gradient(135deg, #f2e3be 0%, #fffaf0 48%, #dfc88e 100%);
}
.scratch-card-prize strong {
    position: relative;
    z-index: 1;
    font-family: var(--font-title);
    font-size: clamp(17px, 5vw, 22px);
    letter-spacing: 0.6px;
}
.scratch-card-prize > span:last-child {
    position: relative;
    z-index: 1;
    color: #6b5327;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}
.scratch-prize-glow {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 151, 88, 0.35), rgba(184, 151, 88, 0) 68%);
    animation: scratchGlow 2.4s ease-in-out infinite;
}
@keyframes scratchGlow {
    0%, 100% { transform: scale(0.9); opacity: 0.55; }
    50% { transform: scale(1.08); opacity: 0.9; }
}
.scratch-prize-bottle {
    position: relative;
    z-index: 1;
    width: 31px;
    height: 62px;
    margin-bottom: 2px;
}
.scratch-bottle-cap {
    position: absolute;
    top: 0;
    left: 8px;
    width: 15px;
    height: 17px;
    border-radius: 3px 3px 1px 1px;
    background: linear-gradient(90deg, #8a692a, #e6c878 52%, #94702e);
    border: 1px solid #5b421b;
}
.scratch-bottle-body {
    position: absolute;
    left: 3px;
    bottom: 0;
    width: 25px;
    height: 47px;
    display: grid;
    place-items: center;
    border: 1px solid #12110f;
    border-radius: 5px;
    background: linear-gradient(90deg, #fff, #dfc88e 52%, #fff);
    box-shadow: 0 6px 8px rgba(18, 17, 15, 0.16);
}
.scratch-bottle-body small {
    color: #12110f;
    font-size: 6px;
    font-weight: 900;
    letter-spacing: 0.2px;
}
.scratch-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: crosshair;
}
.scratch-cover-label {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.95);
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    transition: opacity 0.2s ease;
}
.scratch-cover-label strong { font-size: 19px; letter-spacing: 1px; }
.scratch-cover-label > span:last-child { font-size: 10px; letter-spacing: 0.7px; }
.scratch-coin {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.76);
    border-radius: 50%;
    font-size: 22px;
    animation: scratchHint 1.3s ease-in-out infinite;
}
@keyframes scratchHint {
    0%, 100% { transform: translateX(-5px) rotate(-9deg); }
    50% { transform: translateX(5px) rotate(9deg); }
}
.scratch-card-wrap.is-scratching .scratch-cover-label,
.scratch-card-wrap.revealed .scratch-cover-label { opacity: 0; }
.scratch-card-wrap.revealed .scratch-canvas {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.scratch-card-wrap.unlocking .scratch-card-prize {
    animation: scratchUnlock 0.7s ease-out;
}
@keyframes scratchUnlock {
    0% { transform: scale(0.96); filter: brightness(0.9); }
    45% { transform: scale(1.04); filter: brightness(1.18); }
    100% { transform: scale(1); filter: brightness(1); }
}
.scratch-progress-row {
    display: grid;
    gap: 6px;
    width: 100%;
    max-width: 360px;
    margin: 0 auto 10px;
    text-align: left;
}
.scratch-progress-row > span { color: var(--text-muted); font-size: 10px; font-weight: 700; }
.scratch-progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #ded8cd;
}
.scratch-progress-track > span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #a47d35, #d6b96e);
    transition: width 0.18s ease;
}
.scratch-actions { margin: 0 auto 8px; }
.scratch-reveal-btn,
.shell-btn-claim {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #12110f;
    border-radius: 8px;
    background: #12110f;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}
.scratch-reveal-btn:hover,
.scratch-reveal-btn:focus-visible,
.shell-btn-claim:hover,
.shell-btn-claim:focus-visible { background: #2b2721; }
.scratch-reveal-btn:active,
.shell-btn-claim:active { transform: scale(0.98); }
.scratch-reveal-btn[hidden] { display: none; }
.shell-instruction-text {
    min-height: 18px;
    color: #12110f;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.shell-instruction-text.success { color: #2d6a4f; }

/* PANTALLA 2: selección de la fragancia */
.shell-prize-screen { display: none; text-align: center; }
.shell-prize-screen.active { display: block; animation: shellFade 0.3s ease-out; }
@keyframes shellFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.shell-decant-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 16px;
    max-height: 250px;
    overflow-y: auto;
    padding: 2px;
}
.shell-decant-card {
    min-width: 0;
    min-height: 60px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 6px;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    background: #fff;
    color: #12110f;
    cursor: pointer;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.shell-decant-card:hover,
.shell-decant-card:focus-visible { border-color: #8d6d35; }
.shell-decant-card:active { transform: scale(0.97); }
.shell-decant-card.selected {
    border-color: #12110f;
    background: #fbf9f4;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.shell-decant-thumb { width: 30px; height: 42px; flex-shrink: 0; }
.shell-decant-thumb img,
.shell-decant-thumb svg { width: 100%; height: 100%; object-fit: contain; }
.shell-decant-meta { min-width: 0; flex: 1; }
.shell-decant-name,
.shell-decant-brand { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shell-decant-name { font-size: 10px; font-weight: 700; line-height: 1.2; }
.shell-decant-brand {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.shell-btn-claim:disabled {
    border-color: #d4d0c8;
    background: #d4d0c8;
    color: #8c8880;
    cursor: not-allowed;
}
@media (max-width: 390px) {
    .shell-modal-overlay { padding: 10px; }
    .shell-modal-card { padding: 22px 13px 16px; }
    .scratch-card-wrap { min-height: 176px; }
    .shell-decant-grid { gap: 6px; }
    .shell-decant-card { gap: 5px; padding-inline: 5px; }
}
@media (prefers-reduced-motion: reduce) {
    .shell-modal-card,
    .shell-prize-screen,
    .scratch-prize-glow,
    .scratch-coin,
    .scratch-card-wrap.unlocking .scratch-card-prize { animation: none; }
    .scratch-canvas,
    .scratch-cover-label,
    .scratch-progress-track > span,
    .scratch-reveal-btn,
    .shell-btn-claim { transition: none; }
}
