/* Hero Section */
.hero-section {
    background-color: #fcfdfe; position: relative; overflow: hidden; 
    padding: 80px 0 60px 0; display: flex; align-items: center; min-height: 850px;
}
.hero-glow {
    position: absolute; left: -10%; top: 40%; transform: translateY(-50%); width: 80%; height: 130%;
    background: radial-gradient(circle at 25% 50%, rgba(16, 163, 127, 0.15) 0%, rgba(26, 99, 73, 0.05) 45%, transparent 75%);
    z-index: 1; pointer-events: none; filter: blur(80px);
}

/* --- MOBILE PHONE MOCKUP (Strict Flexbox) --- */
.phone-mockup {
    position: relative; width: 350px; max-width: 100%; height: 720px; margin: 0 auto;
    background: #ffffff; border: 14px solid #0f172a; border-radius: 45px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3), 0 0 0 1px #334155 inset;
    overflow: hidden; display: flex; flex-direction: column; z-index: 10;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: left;
}

/* iOS Home Indicator */
.phone-mockup::after {
    content: ''; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    width: 130px; height: 5px; background: #111827; border-radius: 10px; z-index: 100; pointer-events: none;
}

@media (max-width: 400px) {
    .phone-mockup { transform: scale(0.9); transform-origin: top center; margin-bottom: -10%; }
}
@media (max-width: 350px) {
    .phone-mockup { transform: scale(0.8); transform-origin: top center; margin-bottom: -20%; }
}

.phone-notch {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 120px; height: 28px; background: #0f172a;
    border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; z-index: 50;
}
.ios-status-bar {
    height: 44px; width: 100%; display: flex; justify-content: space-between; align-items: flex-end;
    padding: 0 24px 8px 24px; font-size: 13px; font-weight: 600; color: #000; z-index: 45; background: #fff; flex-shrink: 0;
}
.ios-icons { display: flex; gap: 6px; align-items: center; }

/* --- CHATGPT UI --- */
.cgpt-header {
    height: 44px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; background: white; z-index: 40; flex-shrink: 0;
}
.cgpt-header-title { font-weight: 600; color: #111827; font-size: 15px; }

/* Flex-grow takes all available space above the input bar */
.cgpt-body {
    flex-grow: 1; overflow-y: auto; overflow-x: hidden; padding: 20px 16px;
    display: flex; flex-direction: column; gap: 24px; background: #ffffff;
    padding-bottom: 40px; 
}
.cgpt-body::-webkit-scrollbar { display: none; }

.msg-user {
    align-self: flex-end; background: #f3f4f6; color: #111827; padding: 10px 16px;
    border-radius: 20px; border-bottom-right-radius: 4px; font-size: 15px; line-height: 1.4; max-width: 85%;
    display: none; opacity: 0; transform: translateY(10px); transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.msg-ai { display: none; opacity: 0; transform: translateY(10px); transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); width: 100%; }
.msg-ai-content { font-size: 15px; line-height: 1.5; color: #111827; }
.msg-ai-content strong { color: #000; font-weight: 600;}
.msg-ai-content ul { padding-left: 18px; margin-top: 8px; margin-bottom: 16px; }
.msg-ai-content li { margin-bottom: 6px; }

.visible { display: block !important; opacity: 1 !important; transform: translateY(0) !important; }

/* AI Typing Blinking Dot */
.typing-cursor::after { content: '●'; animation: blink 1s step-start infinite; color: #10a37f; margin-left: 4px; font-size: 12px;}
@keyframes blink { 50% { opacity: 0; } }

/* User Input Blinking Line */
.input-cursor::after { content: '|'; animation: blink 1s step-start infinite; color: #3b82f6; margin-left: 1px; font-weight: 400;}

/* --- OPENAI NATIVE AD UI --- */
.cgpt-ad-wrapper { 
    display: none; opacity: 0; transform: translateY(10px); 
    transition: opacity 0.5s ease, transform 0.5s ease;
    margin-top: 24px; margin-bottom: 12px;
}
.cgpt-ad-wrapper.visible {
    opacity: 1; transform: translateY(0);
}

.cgpt-ad-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: #111827;}
.ad-favicon { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 11px; overflow: hidden; background: #0A271C;}
.ad-brand-text { font-weight: 600; flex-grow: 1;}
.ad-sponsored-tag { color: #6b7280; font-weight: 400; font-size: 12px;}

.cgpt-ad-card {
    background: #f4f4f5; border-radius: 16px; padding: 14px; display: flex; justify-content: space-between; gap: 12px;
    cursor: pointer; transition: background 0.2s; position: relative;
}
.cgpt-ad-card:active { background: #e5e7eb; }
.ad-text-col { flex-grow: 1; }
.ad-title { font-weight: 600; color: #111827; font-size: 14px; line-height: 1.3; margin-bottom: 4px;}
.ad-desc { font-size: 13px; color: #6b7280; line-height: 1.4; }
.ad-image { width: 68px; height: 68px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #e2e8f0; border: 1px solid #e5e7eb;}

/* --- SIMULATED CURSOR --- */
.sim-cursor {
    position: absolute; width: 24px; height: 24px; z-index: 70; pointer-events: none;
    opacity: 0; transition: top 0.8s cubic-bezier(0.25, 1, 0.5, 1), left 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    top: 90%; left: 80%; 
}
.sim-cursor svg { width: 100%; height: 100%; fill: #000; stroke: #fff; stroke-width: 1.5px;}
.sim-cursor.clicking { transform: scale(0.85); transition: transform 0.1s ease; }

@media (max-width: 768px) { .sim-cursor { display: none !important; } }

/* Fake Tap Ripple */
.tap-ripple {
    position: absolute; width: 40px; height: 40px; background: rgba(0,0,0,0.1); border-radius: 50%;
    transform: scale(0); opacity: 1; pointer-events: none; z-index: 65;
}
@keyframes tapAnim { 0% { transform: scale(0); opacity: 0.5; } 100% { transform: scale(2); opacity: 0; } }

/* --- INPUT & KEYBOARD AREA (STRICT FLEXBOX) --- */
.input-area { 
    background: white; width: 100%; z-index: 40; flex-shrink: 0;
    border-top: 1px solid #e5e7eb;
}
.input-bar { padding: 10px 16px 14px 16px; display: flex; align-items: flex-end; gap: 12px; }
.fake-plus { width: 32px; height: 32px; border-radius: 50%; background: #f3f4f6; display: flex; align-items: center; justify-content: center; color: #6b7280; font-size: 16px; flex-shrink: 0; margin-bottom: 2px;}
.fake-input-pill {
    flex-grow: 1; background: #f3f4f6; border-radius: 18px; min-height: 36px; padding: 8px 14px;
    font-size: 15px; color: #111827; line-height: 1.3; border: 1px solid transparent; display: flex; align-items: center;
}
.fake-input-pill.focused { border-color: #3b82f6; background: #ffffff; }

.fake-send { width: 30px; height: 30px; border-radius: 50%; background: #d1d5db; display: flex; align-items: center; justify-content: center; color: white; transition: background 0.2s; flex-shrink: 0; margin-bottom: 3px;}
.fake-send.active { background: #000; }
.fake-send.generating i::before { content: "\f0c8"; font-size: 10px; }
.fake-send.generating { background: #000; }

.ios-keyboard {
    height: 220px; background: #d1d5db; padding: 8px 4px 20px 4px; display: flex; flex-direction: column; gap: 6px;
    transition: height 0.4s cubic-bezier(0.25, 1, 0.5, 1), padding 0.4s ease; overflow: hidden;
}
.kb-row { display: flex; justify-content: center; gap: 5px; }
.kb-key { background: #ffffff; border-radius: 5px; height: 42px; flex: 1; display: flex; align-items: center; justify-content: center; font-size: 20px; color: #000; box-shadow: 0 1px 0 rgba(0,0,0,0.3); }
.kb-key.special { background: #aeb3be; font-size: 14px; }
.kb-key.space { flex: 4; }
.kb-spacer { flex: 0.5; }

.keyboard-hidden .ios-keyboard { height: 0px; padding-top: 0; padding-bottom: 0;}
.keyboard-hidden .input-bar { padding-bottom: 24px; }

/* --- IN-APP BROWSER --- */
.in-app-browser {
    position: absolute; top: 100%; left: 0; width: 100%; height: 100%; background: #ffffff;
    z-index: 60; transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1); display: flex; flex-direction: column;
}
.in-app-browser.open { transform: translateY(-100%); }
.browser-header {
    height: 55px; background: #f9fafb; display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
    border-bottom: 1px solid #d1d5db; font-size: 13px; font-weight: 600; color: #000; padding-top: 10px; flex-shrink: 0;
}
.browser-body { flex-grow: 1; overflow-y: auto; background: #fff; padding-bottom: 20px;}

.m-header { padding: 16px; display: flex; justify-content: space-between; align-items: center; color: white; }
.m-search { margin: 0 16px 16px 16px; background: #f3f4f6; border-radius: 4px; padding: 10px 14px; font-size: 13px; color: #9ca3af; display: flex; gap: 8px; align-items: center;}
.m-nav { display: flex; gap: 16px; padding: 0 16px 12px 16px; border-bottom: 1px solid #e5e7eb; font-size: 12px; font-weight: 600; overflow-x: auto; color: #4b5563;}
.m-nav .active { color: #000; border-bottom: 2px solid #000; padding-bottom: 10px; }
.m-prod-img { width: 100%; height: 200px; object-fit: cover; }
.m-prod-details { padding: 16px; }
.m-prod-title { font-size: 18px; font-weight: 700; color: #111827; margin-bottom: 8px; }
.m-prod-price { font-size: 16px; font-weight: 600; color: #000; margin-bottom: 16px; }
.m-btn { width: 100%; padding: 12px; border-radius: 4px; font-weight: 600; text-align: center; color: white; }

.custom-select-arrow {
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%231A6349%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat; background-position: right 1rem center; background-size: 0.8rem auto;
}
.faq-toggle-icon { transform-origin: center; display: inline-block; transition: transform 0.3s ease;}
