:root {
    --orange: #FFA500;
    --orange-dark: #E89400;
    --orange-light: #FFD080;
    --bg: #F5F5F5;
    --card-bg: #FFFFFF;
    --text: #5C5C5C;
    --text-light: #8a8a8a;
    --nana-msg: #FFF4E0;
    --user-msg: #F0F0F0;
    --border: #E8E8E8;
}

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

body {
    font-family: 'Lexend', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Instrument Sans', 'Lexend', sans-serif;
    color: #3a3a3a;
}

.hidden {
    display: none !important;
}

/* ==============================
   HERO SECTION
   ============================== */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.45) 0%,
        rgba(0,0,0,0.55) 50%,
        rgba(0,0,0,0.7) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px 24px;
    max-width: 640px;
}

.hero-content h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--orange);
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-tagline {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 32px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hero-hint {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    font-style: italic;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 14px 40px;
    background-color: var(--orange);
    color: #FFFFFF;
    border: none;
    border-radius: 15px;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Lexend', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background-color: var(--orange-dark);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    display: inline-block;
    padding: 12px 32px;
    background-color: #FFFFFF;
    color: var(--text);
    border: 2px solid var(--border);
    border-radius: 15px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Lexend', sans-serif;
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-secondary:hover {
    border-color: var(--orange);
    color: var(--orange-dark);
}

/* ==============================
   ABOUT SECTION
   ============================== */
.about-section {
    padding: 80px 24px;
    background: #FFFFFF;
}

.about-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: center;
    justify-content: center;
}

.about-image-wrap {
    flex: 0 0 340px;
    max-width: 100%;
}

.about-image {
    width: 100%;
    border-radius: 15px;
    object-fit: cover;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    color: #3a3a3a;
}

.about-text p {
    font-size: 1.05rem;
    margin-bottom: 16px;
    line-height: 1.7;
}

.about-quote {
    font-style: italic;
    color: var(--orange-dark);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 16px 20px;
    background: #FFF8EC;
    border-left: 4px solid var(--orange);
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

.about-cta-text {
    font-weight: 600;
    color: var(--orange-dark);
}

/* ==============================
   CONVERSATION STARTERS
   ============================== */
.starters-section {
    padding: 80px 24px;
    background: var(--bg);
    text-align: center;
}

.starters-section h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #3a3a3a;
}

.starters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}

.starter-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    background: #FFFFFF;
    border: 2px solid var(--border);
    border-radius: 15px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
    text-align: left;
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    color: var(--text);
    width: 100%;
}

.starter-card:hover {
    border-color: var(--orange);
    transform: translateY(-2px);
}

.starter-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFF4E0;
    border-radius: 12px;
    color: var(--orange-dark);
}

.starter-text {
    font-weight: 500;
    line-height: 1.4;
}

/* ==============================
   PRICING SECTION
   ============================== */
.pricing-section {
    padding: 80px 24px;
    background: #FFFFFF;
}

.pricing-inner {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: center;
    justify-content: center;
}

.pricing-text {
    flex: 1;
}

.pricing-text h2 {
    font-size: 2rem;
    margin-bottom: 32px;
    color: #3a3a3a;
}

.pricing-tiers {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.tier-card {
    flex: 1;
    min-width: 160px;
    padding: 24px 20px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 15px;
    text-align: center;
    position: relative;
}

.tier-card h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text);
}

.tier-price {
    font-size: 2rem;
    font-weight: 700;
    color: #3a3a3a;
    margin-bottom: 8px;
}

.tier-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
}

.tier-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 16px;
}

.tier-trial {
    border-color: var(--orange);
    background: #FFFAF0;
}

.tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-image-wrap {
    flex: 0 0 300px;
    max-width: 100%;
}

.pricing-image {
    width: 100%;
    border-radius: 15px;
    object-fit: cover;
}

/* ==============================
   CHAT START / LOGIN
   ============================== */
.chat-start-section {
    padding: 80px 24px;
    background: var(--bg);
    display: flex;
    justify-content: center;
}

.chat-start-card {
    background: #FFFFFF;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 440px;
    width: 100%;
    border: 2px solid var(--border);
}

.chat-start-card h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #3a3a3a;
}

.chat-start-card p {
    color: var(--text-light);
    margin-bottom: 24px;
}

.chat-start-card input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Lexend', sans-serif;
    margin-bottom: 12px;
    color: var(--text);
    transition: border-color 0.2s;
}

.chat-start-card input:focus {
    outline: none;
    border-color: var(--orange);
}

.chat-start-card .btn-primary {
    width: 100%;
}

/* ==============================
   FOOTER
   ============================== */
.site-footer {
    padding: 40px 24px;
    background: #3a3a3a;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.footer-contact {
    margin-top: 8px;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

/* ==============================
   CHAT PAGE
   ============================== */
.chat-container {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--bg);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text);
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: var(--bg);
}

.chat-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header-name {
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #3a3a3a;
}

.credits {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--orange-dark);
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.chat-window {
    flex-grow: 1;
    background: #FFFFFF;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.5;
}

.nana-message {
    align-self: flex-start;
    background-color: var(--nana-msg);
    border-bottom-left-radius: 2px;
    color: #5a4a20;
}

.user-message {
    align-self: flex-end;
    background-color: var(--user-msg);
    border-bottom-right-radius: 2px;
}

.system-message {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 8px 0;
    font-style: italic;
}

.chat-input-area {
    padding: 14px 16px;
    background: #FFFFFF;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

#message-input {
    flex-grow: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Lexend', sans-serif;
    color: var(--text);
    transition: border-color 0.2s;
}

#message-input:focus {
    outline: none;
    border-color: var(--orange);
}

#send-button {
    padding: 0 24px;
    background-color: var(--orange);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Lexend', sans-serif;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

#send-button:hover {
    background-color: var(--orange-dark);
}

#send-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background-color: var(--nana-msg);
    border-radius: 12px;
    align-self: flex-start;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #c9a050;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Upgrade Section */
#upgrade-section {
    margin-top: 0;
    padding: 12px 16px;
    flex-shrink: 0;
    background: #FFFFFF;
}

.plans-container {
    display: flex;
    gap: 12px;
}

.plan-card {
    flex: 1;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: border-color 0.2s;
}

.plan-card:hover {
    border-color: var(--orange);
}

.plan-name {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--orange-dark);
    margin-bottom: 4px;
}

.plan-description {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.3;
}

.plan-price {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #3a3a3a;
}

.trial-price {
    font-size: 0.9rem;
}

.plan-button {
    width: 100%;
    padding: 10px;
    background-color: var(--orange);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Lexend', sans-serif;
    transition: background 0.2s;
}

.plan-button:hover {
    background-color: var(--orange-dark);
}

.plan-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.premium-active-card {
    background: linear-gradient(135deg, #FFF8EC, #FFFAF0);
    border: 2px solid var(--orange);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    width: 100%;
}

.premium-label {
    font-weight: 700;
    color: var(--orange-dark);
    margin-top: 4px;
}

.premium-desc {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.premium-badge {
    color: var(--orange-dark) !important;
    font-weight: bold;
}

.manage-btn {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    background-color: transparent;
    color: var(--orange-dark);
    border: 2px solid var(--orange);
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Lexend', sans-serif;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.manage-btn:hover {
    background-color: var(--orange);
    color: white;
}

/* Upsell Banner */
.upsell-banner {
    background: linear-gradient(135deg, #FFF4E0, #FFE8C0);
    border: 2px solid var(--orange);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin: 12px 16px 0;
    animation: slideUp 0.4s ease;
}

.upsell-title {
    font-family: 'Instrument Sans', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--orange-dark);
    margin-bottom: 6px;
}

.upsell-text {
    font-size: 0.9rem;
    color: #8a6020;
    margin-bottom: 14px;
    line-height: 1.4;
}

.upsell-button {
    width: auto;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Lexend', sans-serif;
    transition: transform 0.15s;
}

.upsell-button:hover {
    transform: translateY(-1px);
}

.upsell-button:disabled {
    background: #ccc;
    transform: none;
    cursor: not-allowed;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Credits warning states */
.credits-warning {
    color: #e67e22 !important;
    animation: pulse 1.5s ease-in-out infinite;
}

.credits-empty {
    color: #e74c3c !important;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.4rem;
    }

    .hero-subtitle {
        font-size: 1.15rem;
    }

    .about-inner {
        flex-direction: column;
        gap: 32px;
    }

    .about-image-wrap {
        flex: none;
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
    }

    .pricing-inner {
        flex-direction: column;
        gap: 32px;
    }

    .pricing-image-wrap {
        flex: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .pricing-tiers {
        flex-direction: column;
    }

    .tier-card {
        min-width: unset;
    }

    .plans-container {
        flex-direction: column;
    }

    .starters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-section {
        min-height: 80vh;
    }

    .about-section,
    .starters-section,
    .pricing-section,
    .chat-start-section {
        padding: 48px 16px;
    }

    .chat-start-card {
        padding: 28px 20px;
    }
}
