/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Soft greens and blues for care and wellbeing */
    --primary-green: #7FB3A3;
    --primary-blue: #6B9BD1;
    --soft-green: #A8D5BA;
    --soft-blue: #B8D4E3;
    --light-green: #E8F5E9;
    --light-blue: #E3F2FD;
    --dark-text: #2C3E50;
    --medium-text: #5A6C7D;
    --light-text: #8A9BA8;
    --white: #FFFFFF;
    --shadow-soft: 0 4px 20px rgba(123, 179, 163, 0.15);
    --shadow-medium: 0 8px 30px rgba(123, 179, 163, 0.2);
    --border-radius: 24px;
    --border-radius-small: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--dark-text);
    line-height: 1.6;
    background: linear-gradient(180deg, var(--light-green) 0%, var(--light-blue) 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(123, 179, 163, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.powered-by-text {
    font-size: 0.875rem;
    color: var(--medium-text);
    font-weight: 400;
}

.powered-by-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.powered-by-link:hover {
    opacity: 0.8;
}

.powered-by-logo {
    height: 24px;
    width: auto;
    display: block;
    filter: brightness(0) saturate(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.powered-by-link:hover .powered-by-logo {
    opacity: 1;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(232, 245, 233, 0.5) 100%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--medium-text);
    margin-bottom: 32px;
    line-height: 1.5;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--medium-text);
    margin-bottom: 48px;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    color: var(--white);
    border: none;
    padding: 18px 48px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    font-family: 'Inter', sans-serif;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.cta-button:active {
    transform: translateY(0);
}

/* Mission Section */
.mission {
    padding: 100px 0;
    background: var(--white);
}

.mission-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.mission h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 32px;
}

.mission-statement {
    font-size: 1.25rem;
    color: var(--medium-text);
    line-height: 1.8;
    font-weight: 400;
}

/* Chat Section */
.chat-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--light-blue) 0%, var(--light-green) 100%);
}

.chat-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.chat-wrapper h2 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 40px;
    text-align: center;
}

.chat-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

/* Login Notice */
.login-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    min-height: 500px;
}

.login-icon {
    font-size: 4rem;
    margin-bottom: 24px;
}

.login-notice h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 16px;
}

.login-notice p {
    font-size: 1.125rem;
    color: var(--medium-text);
    margin-bottom: 32px;
    max-width: 500px;
}

.login-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 300px;
}

.facebook-login-btn,
.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--white);
    border: none;
    padding: 16px 32px;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    width: 100%;
}

.facebook-login-btn {
    background: #1877F2;
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

.facebook-login-btn:hover {
    background: #166FE5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.4);
}

.facebook-login-btn:active {
    transform: translateY(0);
}

.google-login-btn {
    background: var(--white);
    color: var(--dark-text);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.google-login-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.google-login-btn:active {
    transform: translateY(0);
}

.facebook-login-btn svg,
.google-login-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Chat Interface */
.chat-interface {
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    height: 100%;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(123, 179, 163, 0.2);
    background: var(--light-green);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.history-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.history-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

.history-btn svg {
    width: 18px;
    height: 18px;
}

.memory-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.memory-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.memory-btn svg {
    width: 18px;
    height: 18px;
}

.delete-account-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #c62828;
    color: #c62828;
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.delete-account-btn:hover {
    background: #c62828;
    color: var(--white);
}

.delete-account-btn svg {
    width: 18px;
    height: 18px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info span {
    font-weight: 500;
    color: var(--dark-text);
    font-size: 0.95rem;
}

.logout-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.logout-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message {
    display: flex;
    max-width: 75%;
    animation: fadeIn 0.3s ease;
}

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

.ai-message {
    align-self: flex-start;
}

.user-message {
    align-self: flex-end;
}

.message-content {
    padding: 16px 20px;
    border-radius: var(--border-radius-small);
    line-height: 1.6;
}

.ai-message .message-content {
    background: var(--light-green);
    color: var(--dark-text);
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.chat-input-container {
    display: flex;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid rgba(123, 179, 163, 0.2);
    background: var(--white);
}

.chat-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid var(--soft-green);
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    outline: none;
}

.chat-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(123, 179, 163, 0.1);
}

.send-btn {
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.send-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.send-btn:active {
    transform: translateY(0);
}

/* Typing Indicator */
.typing-indicator {
    padding: 16px 20px;
    background: var(--light-green);
    border-radius: var(--border-radius-small);
    border-bottom-left-radius: 4px;
}

.typing-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-green);
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* History View */
.history-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(123, 179, 163, 0.2);
    background: var(--light-green);
}

.history-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-text);
}

.close-history-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.close-history-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.history-loading {
    text-align: center;
    color: var(--medium-text);
    padding: 40px 20px;
}

.history-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(123, 179, 163, 0.1);
}

.history-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.history-item-date {
    font-size: 0.75rem;
    color: var(--light-text);
    margin-bottom: 12px;
    font-weight: 500;
}

.history-item-message {
    margin-bottom: 12px;
}

.history-item-message.user {
    text-align: right;
}

.history-item-message-content {
    display: inline-block;
    padding: 12px 16px;
    border-radius: var(--border-radius-small);
    max-width: 75%;
    font-size: 0.95rem;
    line-height: 1.5;
}

.history-item-message.user .history-item-message-content {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    color: var(--white);
    border-bottom-right-radius: 4px;
}

.history-item-message.ai .history-item-message-content {
    background: var(--light-green);
    color: var(--dark-text);
    border-bottom-left-radius: 4px;
}

.history-empty {
    text-align: center;
    color: var(--medium-text);
    padding: 60px 20px;
}

.history-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.history-empty p {
    font-size: 1rem;
    margin: 0;
}

/* Memory View */
.memory-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.memory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(123, 179, 163, 0.2);
    background: var(--light-blue);
}

.memory-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark-text);
}

.close-memory-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.close-memory-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.memory-list {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.memory-loading {
    text-align: center;
    color: var(--medium-text);
    padding: 40px 20px;
}

.memory-item {
    background: var(--white);
    border: 1px solid rgba(123, 179, 163, 0.2);
    border-radius: var(--border-radius-small);
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.memory-item:hover {
    box-shadow: var(--shadow-soft);
    border-color: var(--primary-green);
}

.memory-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.memory-item-date {
    font-size: 0.75rem;
    color: var(--light-text);
    font-weight: 500;
}

.memory-item-actions {
    display: flex;
    gap: 8px;
}

.memory-item-btn {
    padding: 4px 12px;
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.edit-memory-btn {
    background: var(--light-green);
    color: var(--primary-green);
}

.edit-memory-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

.delete-memory-btn {
    background: #ffebee;
    color: #c62828;
}

.delete-memory-btn:hover {
    background: #c62828;
    color: var(--white);
}

.memory-item-content {
    font-size: 0.95rem;
    color: var(--dark-text);
    line-height: 1.6;
    margin-bottom: 12px;
}

.memory-item-content.editing {
    display: none;
}

.memory-item-edit {
    display: none;
    width: 100%;
    padding: 12px;
    border: 2px solid var(--primary-green);
    border-radius: var(--border-radius-small);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    resize: vertical;
    min-height: 60px;
    outline: none;
}

.memory-item-edit.active {
    display: block;
}

.memory-item-edit-actions {
    display: none;
    gap: 8px;
    margin-top: 8px;
}

.memory-item-edit-actions.active {
    display: flex;
}

.save-memory-btn {
    padding: 8px 16px;
    background: var(--primary-green);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.save-memory-btn:hover {
    background: var(--primary-blue);
}

.cancel-memory-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--medium-text);
    color: var(--medium-text);
    border-radius: var(--border-radius-small);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.cancel-memory-btn:hover {
    background: var(--medium-text);
    color: var(--white);
}

.memory-empty {
    text-align: center;
    color: var(--medium-text);
    padding: 60px 20px;
}

.memory-empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.memory-empty p {
    font-size: 1rem;
    margin: 0;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    background: var(--white);
    border-top: 1px solid rgba(123, 179, 163, 0.2);
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer .copyright {
    color: var(--medium-text);
    font-size: 0.95rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-link {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer .powered-by {
    margin-top: 4px;
}

.footer .powered-by-logo {
    height: 28px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .mission h2,
    .chat-wrapper h2 {
        font-size: 2rem;
    }

    .mission-statement {
        font-size: 1.125rem;
    }

    .chat-container {
        min-height: 400px;
    }

    .chat-interface {
        height: 400px;
    }

    .message {
        max-width: 85%;
    }

    .chat-messages {
        padding: 24px 16px;
    }

    .chat-input-container {
        padding: 16px;
    }

    .footer .container {
        gap: 16px;
    }

    .powered-by-logo {
        height: 20px;
    }

    .footer .powered-by-logo {
        height: 24px;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

