@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700&display=swap');

:root {
    --primary-color: #5E5DF0;
    --primary-hover: #4F4CDE;
    --secondary-color: #F6F8FA;
    --text-dark: #1D1D1F;
    --text-light: #4A4A4A;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --border-color: #e1e4e8;
    --card-bg: rgba(255, 255, 255, 0.75);
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #FFFFFF;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Graphic Shapes (Original) */
.graphic-shape {
    position: absolute;
    z-index: -1;
    opacity: 0.5;
    border-radius: 50%;
}
.shape1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(to right, #a1c4fd, #c2e9fb);
    top: -100px;
    left: -100px;
}
.shape2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(to right, #ff8177, #ff867a);
    bottom: -80px;
    right: -80px;
}


/* Navigation Bar */
.main-nav {
    padding: 15px 30px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.nav-logo {
    width: 90px;
    height: auto;
}
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lang-switcher a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.2s;
}
.lang-switcher a:hover {
    color: var(--primary-color);
}
.lang-switcher a.active {
    color: var(--primary-color);
    font-weight: 700;
}
.lang-switcher span {
    color: var(--border-color);
}

/* --- HERO SECTION --- */
.hero {
    background-image: url('/images/Anna-Real-500.png');
    background-size: cover;
    background-position: center center;
    position: relative;
    color: white;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    text-align: left;
    min-height: 80vh;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(10, 20, 30, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1;
}
.hero > * {
    position: relative;
    z-index: 2;
}
.hero-text {
    max-width: 550px;
}
.header h1 {
    font-size: 3.2em;
    line-height: 1.2;
    margin: 0 0 15px 0;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.header p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0 0 25px 0;
    color: white;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.lang-zh {
    font-size: 0.6em;
    color: var(--text-light);
    font-weight: 400;
    display: block;
    margin-top: 8px;
}
.demo-form {
    display: flex;
    max-width: 500px;
    margin: 30px 0 15px 0;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    overflow: hidden;
}
.demo-form input {
    flex-grow: 1; border: none; background: rgba(0,0,0,0.2);
    padding: 18px 20px; font-size: 1em; outline: none; color: white;
}
.demo-form input::placeholder { color: rgba(255, 255, 255, 0.7); }
.demo-form button {
    border: none; background-color: var(--primary-color); color: white;
    font-size: 1em; font-weight: 500; padding: 18px 30px; cursor: pointer;
    white-space: nowrap; transition: background-color 0.2s;
}
.demo-form button:hover { background-color: var(--primary-hover); }
.form-disclaimer {
    font-size: 0.9em; color: rgba(255, 255, 255, 0.8);
    max-width: 500px; margin: 15px 0 0 0;
}
.hero-image-container {
    display: flex;
}
.hero .agent-lineup {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 50px;
}
.hero .agent-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    margin-left: -50px;
    transition: transform 0.3s ease-out;
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
}
.hero .agent-lineup img:nth-child(1) { animation-delay: 0.1s; }
.hero .agent-lineup img:nth-child(2) { animation-delay: 0.2s; }
.hero .agent-lineup img:nth-child(3) { animation-delay: 0.3s; }
.hero .agent-lineup img:nth-child(4) { animation-delay: 0.4s; }
.hero .agent-lineup img:nth-child(5) { animation-delay: 0.5s; }
.hero .agent-lineup img:nth-child(6) { animation-delay: 0.6s; }
.hero .agent-lineup img:nth-child(7) { animation-delay: 0.7s; }

/* --- LOADING & RESULT (INSIDE HERO) --- */
.loading-container, .result-container {
    margin-top: 30px;
    position: relative;
    text-align: center;
}
.result-container {
    text-align: center;
}
#loading-status {
    color: white;
    font-weight: 500;
    font-size: 1.2em;
    margin-top: 20px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}
#loading-status.error-message {
    color: #ff4d4d;
}

/* --- DEFINITIVE COUNTDOWN TIMER FIX --- */
#loading-container .countdown-container {
    font-size: 4em;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 15px;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}
#countdown-timer {
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.spinner {
    width: 40px; height: 40px; border: 4px solid rgba(255,255,255,0.2);
    border-top-color: var(--primary-color); border-radius: 50%;
    animation: spin 1s linear infinite; margin: 20px auto;
}

.result-title-link {
    text-decoration: none;
    display: block;
}
.result-title-link h3 {
    margin: 0 0 20px;
    font-size: 1.8em;
    line-height: 1.4;
    animation: flash-green-white 1.5s infinite;
}
@keyframes flash-green-white {
    0%, 100% { color: var(--success-color); }
    50% { color: white; }
}

.demo-preview-wrapper {
    position: relative;
    max-width: 800px;
    margin: 20px auto;
}
.demo-preview-link {
    display: block; border-radius: 8px; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    border: 3px solid white;
}
#demo-preview-image {
    width: 100%; display: block;
}
.result-actions {
    display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 30px;
}
.result-button {
    padding: 12px 25px; text-decoration: none; border-radius: 8px;
    font-weight: 500; font-size: 1em; cursor: pointer; border: none;
    transition: all 0.2s;
}
.view-button { background-color: var(--success-color); color: white; }
.view-button:hover { background-color: #218838; }
.copy-button { background-color: #fff; color: var(--text-dark); }
.restart-button { background-color: #6c757d; color: white; }

/* --- PRICING GRID --- */
.pricing-section { background-color: var(--secondary-color); }
.pricing-grid {
    display: grid; grid-template-columns: 1fr;
    gap: 30px; max-width: 1200px; margin: 0 auto;
}
.pricing-card {
    background: #FFFFFF; padding: 30px; border-radius: 15px;
    border: 1px solid var(--border-color);
    text-align: left; display: flex; flex-direction: column;
}
.pricing-card.featured {
    border-color: var(--primary-color); position: relative;
    box-shadow: 0 10px 30px rgba(94,93,240,0.1);
}
.featured-tag {
    position: absolute; top: -15px; right: 20px;
    background-color: var(--primary-color); color: white;
    padding: 5px 15px; border-radius: 20px;
    font-size: 0.9em; font-weight: 500;
}
.pricing-card h3 { font-size: 1.8em; margin: 0 0 5px 0; }
.pricing-card .card-subtitle { color: var(--text-light); margin-bottom: 20px; }
.price-main-twd {
    display: flex; align-items: baseline; gap: 8px;
    margin-bottom: 25px; padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}
.price-main-twd .price { font-size: 2.8em; font-weight: 700; color: var(--text-dark); }
.price-main-twd .term { font-size: 1em; color: var(--text-light); }
.features-list { list-style: none; padding: 0; margin: 0 0 25px 0; flex-grow: 1; }
.features-list li {
    padding-left: 30px; position: relative; margin-bottom: 15px;
}
.features-list li::before {
    content: '✓'; color: var(--success-color);
    position: absolute; left: 0; top: 0; font-size: 1.2em;
}

.pricing-card .view-button { width: 100%; padding: 16px; font-size: 1.1em; }

/* --- OTHER CONTENT SECTIONS --- */
.section { padding: 80px 20px; text-align: center; }
.section-title { font-size: 2.2em; margin-bottom: 20px; }
.section-subtitle { font-size: 1.1em; color: var(--text-light); margin-bottom: 50px; max-width: 600px; margin-left: auto; margin-right: auto; }
.benefits-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; text-align: left; }
.benefit-card { background: var(--secondary-color); padding: 30px; border-radius: 15px; }
.benefit-card h3 { color: var(--primary-color); margin: 0 0 10px 0; }
.faq-section { background-color: var(--secondary-color); }
.faq-container { max-width: 800px; margin: 0 auto; text-align: left; }
.faq-item {
    background: #FFFFFF;
    margin-bottom: 15px;
    border-radius: 10px;
    padding: 20px 25px;
    border: 1px solid #e0e0e0;
}
.faq-question {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 10px 0;
}
.faq-answer {
    font-size: 1em;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}
.industry-section { background-color: #fff; }
.industry-grid {
     display: flex;
     justify-content: center;
     gap: 20px;
     flex-wrap: wrap;
}
.industry-tag {
    background: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.cta-section { background: var(--primary-color); color: white; }
.cta-section .section-title, .cta-section .section-subtitle { color: white; }

/* --- BIG FAT ARROW --- */
.animated-arrow-container {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); z-index: 10;
    display: flex; align-items: center;
    animation: pointAndPulse 1.8s ease-in-out infinite;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.4));
}
.arrow-body {
    background-color: var(--success-color); color: white;
    padding: 15px 25px; border-radius: 10px;
    font-size: 1.5em; font-weight: 700; white-space: nowrap;
}
.arrow-head {
    width: 0; height: 0; border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 20px solid var(--success-color);
}
@keyframes pointAndPulse {
    0%, 100% { transform: scale(1) translate(-50%, -50%); }
    50% { transform: scale(1.05) translate(-50%, -50%); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes slideIn {
    from { opacity: 0; transform: translateX(30px) scale(0.8); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- FOOTER --- */
.main-footer { padding: 40px 20px; text-align: center; color: var(--text-light); font-size: 0.9em; background: var(--secondary-color); }
.footer-links { margin-bottom: 15px; }
.footer-links a { color: var(--text-light); text-decoration: none; margin: 0 10px; }
.footer-links a:hover { color: var(--primary-color); }
.token-counter {
    font-family: monospace;
    font-size: 0.9em;
    margin-top: 8px;
    display: inline-block;
    color: #aaa;
}

/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); display: flex;
    justify-content: center; align-items: center; z-index: 1000;
}
.modal-content {
    background: white; padding: 30px 40px 40px 40px; border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 90%; max-width: 500px;
    text-align: center; position: relative;
}
.modal-overlay.hidden { display: none; }
.close-button {
    position: absolute; top: 10px; right: 15px; background: none; border: none;
    font-size: 2em; color: #ccc; cursor: pointer;
}
.promo-form-modal { display: flex; flex-direction: column; gap: 20px; text-align: left; margin-top: 25px; }
.form-group { display: flex; flex-direction: column; }
.promo-form-modal label { margin-bottom: 8px; font-weight: 500; font-size: 1em; color: var(--text-light); }
.promo-form-modal input, .promo-form-modal textarea {
    padding: 15px; border: 1px solid #ccc; border-radius: 8px; font-size: 1.1em;
}
.promo-form-modal button { width: 100%; padding: 16px; font-size: 1.2em; margin-top: 10px; }
.modal-success { color: var(--success-color); }
.scrape-data-container {
    max-height: 40vh;
    overflow-y: auto;
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 15px;
    text-align: left;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.9em;
    color: #333;
    border-radius: 8px;
    margin-top: 15px;
}
#training-complete-button {
    margin-top: 20px;
    width: 100%;
}

/* --- UTILITY & MISC --- */
.hidden { display: none !important; }
#keep-copy-button {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background-color: var(--success-color);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 500;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    transform: translateY(-100px);
}
#keep-copy-button.visible {
    transform: translateY(0);
}
#keep-copy-button:hover {
    background-color: #218838;
}
.session-counter { 
    position: fixed; 
    bottom: 10px; 
    left: 10px; 
    background-color: rgba(0, 0, 0, 0.1); 
    color: #576574; 
    padding: 3px 8px; 
    border-radius: 10px; 
    font-size: 0.75em; 
    font-family: monospace; 
}
.scraper-ticker-container { 
    width: 100%; 
    height: 24px; 
    background-color: #f1f2f6; 
    border-radius: 4px; 
    overflow: hidden; 
    position: relative; 
    margin-top: 15px; 
    white-space: nowrap; 
}
.scraper-ticker-text { 
    position: absolute; 
    top: 2px; 
    color: var(--text-light); 
    font-size: 0.9em; 
    animation: scroll-left 8.3s linear infinite; 
    padding-left: 100%; 
}
@keyframes scroll-left { 
    0% { transform: translateX(0%); } 
    100% { transform: translateX(-100%); } 
}
.result-instruction {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0 auto 20px auto;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 90%;
}
.anna-icon-prompt {
    width: 28px;
    height: 28px;
    animation: bounce-icon 2.5s ease-in-out infinite;
}
@keyframes bounce-icon {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}
.savings-badge {
    background-color: var(--warning-color);
    color: var(--text-dark);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 700;
    transform: rotate(-3deg);
}

/* --- RESPONSIVE DESIGN --- */
@media (min-width: 992px) {
    .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero .hero-text {
        order: 2;
    }
    .hero .hero-image-container {
        order: 1;
        margin-bottom: 30px;
        padding-left: 0;
        display: none;
    }
    .header h1 { font-size: 2.5em; }
    .demo-form { flex-direction: column; gap: 10px; border: none; }
    .demo-form input { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.4); border-radius: 8px; text-align: center; }
    .demo-form button { border-radius: 8px; }
    .nav-content { flex-direction: column; gap: 15px; }
    .footer-links { flex-direction: column; gap: 10px; }
    .session-counter { display: none; }
    #keep-copy-button {
        padding: 12px 20px;
        font-size: 1em;
        width: calc(100% - 40px);
        left: 20px;
    }
    .coffee-section-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Countdown Timer */
    #loading-container .countdown-container {
        font-size: 2.5em;
    }
}