:root {
    --wa-dark-bg: #0b141a;
    --wa-dark-header: #202c33;
    --wa-dark-chat-bg: #0b141a;
    --wa-msg-received: #202c33;
    --wa-msg-sent: #005c4b;
    --wa-green: #00a884;
    --wa-red: #f15c6d;
    --wa-text-primary: #e9edef;
    --wa-text-secondary: #8696a0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.mobile-wrapper {
    width: 100%;
    max-width: 480px;
    height: 100dvh;
    background-color: var(--wa-dark-bg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.app-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    z-index: 10;
}

.view.active {
    display: flex;
}

/* Chat view needs relative positioning for the overlay */
#chat-view { position: relative; overflow: hidden; }

/* --- VIDEO VIEW --- */
.view-video { background: #000; }
.video-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
#main-video { width: 100%; height: 100%; object-fit: cover; }
.video-controls-bar { position: absolute; bottom: 30px; left: 0; width: 100%; display: flex; justify-content: center; gap: 20px; z-index: 5; padding: 0 20px; }
.btn-circle { width: 55px; height: 55px; border-radius: 50%; border: none; display: flex; justify-content: center; align-items: center; font-size: 20px; color: white; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: transform 0.2s; }
.btn-circle:active { transform: scale(0.95); }
.btn-gray { background-color: rgba(255,255,255,0.2); backdrop-filter: blur(5px); }

/* Play/Pause/Action Overlay */
.video-action-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; z-index: 10; backdrop-filter: blur(3px); }
.btn-primary { background: var(--wa-green); color: white; border: none; padding: 16px 32px; font-size: 18px; font-weight: 600; border-radius: 30px; cursor: pointer; box-shadow: 0 5px 15px rgba(0, 168, 132, 0.4); animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; transition: transform 0.2s, background 0.2s; }
.btn-primary:active { transform: scale(0.95); background: #008f6f; }

/* Final CTA Panel */
.cta-panel { position: absolute; background: var(--wa-dark-header); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 25px 20px; z-index: 20; box-shadow: 0 10px 30px rgba(0,0,0,0.8); text-align: center; animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
.cta-center { top: 50%; left: 20px; right: 20px; transform: translateY(-50%); }
.cta-panel h3 { color: white; font-size: 20px; margin-bottom: 12px; }
.price-tag { color: var(--wa-text-secondary); font-size: 16px; margin-bottom: 25px; }
.price-tag span { display: block; font-size: 32px; color: var(--wa-green); font-weight: 700; margin-top: 5px; }
.btn-cta { display: flex; justify-content: center; align-items: center; gap: 8px; background: var(--wa-green); color: white; text-decoration: none; padding: 16px; border-radius: 30px; font-weight: 600; font-size: 16px; transition: background 0.3s; }
.btn-cta:hover { background: #008f6f; }

/* --- CHAT VIEW --- */
.view-chat { background-color: var(--wa-dark-bg); }
.chat-header { height: 60px; background-color: var(--wa-dark-header); display: flex; align-items: center; justify-content: space-between; padding: 0 10px; color: var(--wa-text-primary); z-index: 10; }
.header-left { display: flex; align-items: center; gap: 8px; flex: 1; }
.btn-back, .header-right button { background: none; border: none; color: var(--wa-text-primary); font-size: 20px; padding: 5px; cursor: pointer; }
.header-right { display: flex; gap: 15px; }
.avatar-small { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.user-info h3 { font-size: 16px; font-weight: 500; }
.user-info p { font-size: 13px; color: var(--wa-text-secondary); }

.chat-bg { position: absolute; top: 60px; left: 0; width: 100%; height: calc(100% - 120px); background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png'); background-blend-mode: overlay; background-color: #0d1418; opacity: 0.15; z-index: 1; }
.chat-messages-container { flex: 1; overflow-y: auto; padding: 15px; padding-bottom: 20px; display: flex; flex-direction: column; z-index: 5; scroll-behavior: smooth; }
.date-badge { align-self: center; background: #182229; color: var(--wa-text-secondary); font-size: 12px; padding: 5px 12px; border-radius: 10px; margin-bottom: 15px; }

.message { display: flex; margin-bottom: 12px; max-width: 85%; clear: both; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes popIn { 0% { transform: scale(0.9); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.message.sent { align-self: flex-end; }
.message.received { align-self: flex-start; }

.bubble { padding: 8px 12px; border-radius: 12px; font-size: 15px; line-height: 1.4; color: var(--wa-text-primary); position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.message.sent .bubble { background-color: var(--wa-msg-sent); border-top-right-radius: 4px; }
.message.received .bubble { background-color: var(--wa-msg-received); border-top-left-radius: 4px; }
.msg-text { word-wrap: break-word; }
.msg-time { font-size: 11px; color: rgba(255,255,255,0.6); float: right; margin-left: 10px; margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.msg-status-icon { color: #53bdeb; }

/* Fake Photos */
.photo-msg { width: 140px; height: 100px; background: #13222b; border-radius: 8px; margin-top: 5px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--wa-text-secondary); font-size: 13px; border: 1px solid rgba(255,255,255,0.05); }

/* Interactive Catalog Card (LARGER) */
.catalog-card { background: rgba(0,0,0,0.3); border-radius: 12px; padding: 15px; margin-top: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; border: 1px solid rgba(0, 168, 132, 0.4); cursor: pointer; transition: background 0.2s, transform 0.2s; box-shadow: 0 4px 15px rgba(0,0,0,0.3); position: relative; }
.catalog-card:active { background: rgba(0, 168, 132, 0.2); transform: scale(0.98); }
.catalog-card.large-card { width: 250px; }
.catalog-img { width: 100%; height: 120px; border-radius: 8px; object-fit: cover; }
.catalog-info h4 { font-size: 16px; margin-bottom: 6px; color: white; }
.catalog-info p { font-size: 14px; color: var(--wa-text-secondary); line-height: 1.3; }

.click-hint-large { background: var(--wa-green); color: white; border-radius: 20px; padding: 8px 16px; font-size: 14px; font-weight: bold; width: 100%; margin-top: 5px; animation: pulseHint 1.5s infinite; text-transform: uppercase; }

@keyframes pulseHint {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 168, 132, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 168, 132, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 168, 132, 0); }
}

/* Finger pointing to the catalog */
.pointer-hand { position: absolute; right: -15px; bottom: 5px; font-size: 35px; color: #ffcc00; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); z-index: 15; animation: pointBounce 0.8s infinite alternate ease-in-out; }
@keyframes pointBounce { 0% { transform: translate(0, 0) rotate(-20deg); } 100% { transform: translate(-10px, -15px) rotate(-20deg); } }

.hidden { display: none !important; }

/* Typing indicator */
.typing-dots { display: flex; gap: 4px; padding: 5px 2px; }
.typing-dots span { width: 6px; height: 6px; background: var(--wa-text-secondary); border-radius: 50%; animation: blink 1.4s infinite both; }
.typing-dots span:nth-child(1) { animation-delay: 0.2s; }
.typing-dots span:nth-child(2) { animation-delay: 0.4s; }
.typing-dots span:nth-child(3) { animation-delay: 0.6s; }
@keyframes blink { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 20% { opacity: 1; transform: scale(1); } }

/* Footer */
.chat-footer { height: 60px; background-color: var(--wa-dark-bg); display: flex; align-items: center; padding: 8px; gap: 8px; z-index: 10; }
.btn-icon-soft { background: none; border: none; color: var(--wa-text-secondary); font-size: 24px; padding: 5px; }
.input-box { flex: 1; background-color: var(--wa-dark-header); border-radius: 24px; height: 42px; display: flex; align-items: center; padding: 0 15px; color: var(--wa-text-secondary); font-size: 15px; }
.btn-mic { width: 45px; height: 45px; border-radius: 50%; background-color: var(--wa-green); border: none; color: white; font-size: 18px; display: flex; justify-content: center; align-items: center; }

/* --- OFFER TRANSITION VIEW --- */
.view-offer-transition { background-color: #0b141a; justify-content: center; align-items: center; }
.offer-transition-content { text-align: center; padding: 20px; }
.pulse-btn { animation: pulseBig 2s infinite; font-size: 22px; padding: 20px 30px; }

@keyframes pulseBig {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 168, 132, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(0, 168, 132, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 168, 132, 0); }
}

/* --- BONUS PRESENTATION VIEW --- */
.view-bonus {
    background: #05070a;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 255, 195, 0.08), transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(110, 123, 242, 0.08), transparent 50%);
}

.bonus-container {
    width: 100%; height: 100%; overflow-y: auto;
    padding: 24px 18px 40px;
    display: flex; flex-direction: column; align-items: center;
    scrollbar-width: none;
}
.bonus-container::-webkit-scrollbar { display: none; }

/* -- Header section -- */
.bonus-header { text-align: center; margin-bottom: 28px; padding: 0 8px; }

.bonus-badge-top {
    display: inline-block;
    background: linear-gradient(90deg, rgba(0,255,195,0.15), rgba(110,123,242,0.15));
    border: 1px solid rgba(0,255,195,0.3);
    color: #00ffc3;
    font-size: 11px; font-weight: 800; letter-spacing: 2px;
    padding: 5px 14px; border-radius: 99px;
    margin-bottom: 14px;
}

.bonus-title {
    color: #fff; font-size: 22px; font-weight: 900;
    line-height: 1.2; margin: 0;
}
.bonus-title-highlight {
    background: linear-gradient(90deg, #00ffc3, #6e7bf2);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bonus-subtitle {
    color: rgba(255,255,255,0.45); font-size: 12px;
    margin-top: 8px;
}

/* -- Cards list -- */
.bonus-cards-list {
    display: flex; flex-direction: column;
    gap: 16px; width: 100%; max-width: 360px;
    padding-bottom: 20px;
}

/* -- Individual card -- */
.bonus-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px; overflow: hidden;
    backdrop-filter: blur(12px);
    display: flex; flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    opacity: 0; position: relative;
    animation: cardSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    transition: border-color 0.3s;
}
.bonus-card:hover { border-color: rgba(0,255,195,0.35); }

.bonus-card-number {
    position: absolute; top: 10px; left: 12px;
    background: linear-gradient(135deg, #00ffc3, #6e7bf2);
    color: #05070a; font-size: 11px; font-weight: 900;
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 2; box-shadow: 0 2px 8px rgba(0,255,195,0.4);
}

.bonus-card-img {
    width: 100%; height: 150px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.bonus-card-info { padding: 16px 16px 18px; }

.bonus-tag {
    display: inline-block;
    background: linear-gradient(90deg, rgba(0,255,195,0.12), rgba(110,123,242,0.12));
    border: 1px solid rgba(0,255,195,0.25);
    color: #00ffc3; font-size: 9px; font-weight: 800;
    letter-spacing: 1.5px; padding: 3px 10px;
    border-radius: 99px; margin-bottom: 8px;
    text-transform: uppercase;
}

.bonus-card-info h4 {
    color: #fff; font-size: 17px; font-weight: 800;
    margin-bottom: 7px; line-height: 1.2;
}
.bonus-card-info p {
    color: rgba(255,255,255,0.55); font-size: 13px;
    line-height: 1.5;
}

/* -- Persuasive text -- */
.bonus-persuasive {
    background: linear-gradient(135deg, rgba(0,255,195,0.06), rgba(110,123,242,0.06));
    border: 1px solid rgba(0,255,195,0.15);
    border-radius: 16px; padding: 14px 16px;
    display: flex; align-items: flex-start; gap: 10px;
    opacity: 0; animation: cardSlideUp 0.7s cubic-bezier(0.22,1,0.36,1) forwards;
}
.bonus-persuasive i { color: #00ffc3; font-size: 18px; flex-shrink: 0; margin-top: 2px; }
.bonus-persuasive p { color: rgba(255,255,255,0.7); font-size: 13px; line-height: 1.5; font-style: italic; }

/* -- CTA at bottom -- */
.bonus-cta-section {
    width: 100%; text-align: center;
    padding: 24px 12px 8px;
    opacity: 0; animation: cardSlideUp 0.8s cubic-bezier(0.22,1,0.36,1) forwards;
}

.bonus-cta-divider {
    width: 60px; height: 3px; margin: 0 auto 20px;
    background: linear-gradient(90deg, #00ffc3, #6e7bf2);
    border-radius: 99px;
}

.bonus-cta-label {
    color: rgba(255,255,255,0.45); font-size: 11px;
    letter-spacing: 1px; margin-bottom: 10px; text-transform: uppercase;
}

.bonus-cta-title {
    color: #fff; font-size: 20px; font-weight: 900;
    margin-bottom: 14px; line-height: 1.2;
}

.price-tag {
    color: rgba(255,255,255,0.6); font-size: 14px;
    margin-bottom: 18px; line-height: 1.6;
}
.price-tag span {
    display: block; font-size: 36px; font-weight: 900;
    background: linear-gradient(90deg, #00ffc3, #6e7bf2);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-top: 4px;
}

.btn-cta-modern {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(90deg, #00ffc3, #6e7bf2);
    color: #05070a; font-weight: 900; font-size: 17px;
    padding: 16px 24px; border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(0,255,195,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    width: 100%; letter-spacing: -0.3px;
}
.btn-cta-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(0,255,195,0.5);
}

.bonus-cta-guarantee {
    color: rgba(255,255,255,0.35); font-size: 11px;
    margin-top: 12px;
}

@keyframes cardSlideUp {
    0% { transform: translateY(50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* --- ERROR OVERLAY --- */
.bad-chat-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); z-index: 100;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    backdrop-filter: blur(5px);
    opacity: 0; transition: opacity 0.3s;
}
.bad-chat-overlay.active { opacity: 1; }
.bad-chat-overlay.hidden { display: none !important; }
