/* Unwind - Privacy-focused AI Journal */
/* Clean, calming design - therapy app vibes */

:root {
    /* Primary palette - calm blues */
    --primary: #4A90A4;
    --primary-dark: #3A7589;
    --primary-light: #6BB5CC;

    /* Neutrals - warm and soft */
    --bg: #FAFBFC;
    --bg-alt: #F0F4F8;
    --surface: #FFFFFF;
    --surface-hover: #F7F9FB;

    /* Text */
    --text: #2D3748;
    --text-secondary: #718096;
    --text-muted: #A0AEC0;

    /* Accents */
    --accent: #68D391;
    --accent-warm: #F6AD55;
    --error: #FC8181;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.03);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);

    /* Spacing */
    --radius: 12px;
    --radius-lg: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 3rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

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

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 16px 0;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-logo span {
    color: var(--text);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.btn-primary {
    color: #F7F9FB;
}

.nav-links a.btn-primary:hover {
    color: #FFFFFF;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    color: var(--text);
    border-color: rgba(0,0,0,0.15);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.hero h1 {
    margin-bottom: 24px;
    font-size: 3.5rem;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-badges {
    display: flex;
    gap: 24px;
    justify-content: center;
    margin-top: 48px;
    flex-wrap: wrap;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero-badge svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

/* Features Section */
.features {
    padding: 100px 0;
}

.features-header {
    text-align: center;
    margin-bottom: 60px;
}

.features-header p {
    font-size: 1.1rem;
    margin-top: 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-alt);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary);
}

.feature-card h3 {
    margin-bottom: 12px;
}

/* How It Works */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-alt);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.step {
    text-align: center;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto 20px;
}

.step h3 {
    margin-bottom: 12px;
}

/* Pricing Section */
.pricing {
    padding: 100px 0;
}

.pricing-header {
    text-align: center;
    margin-bottom: 60px;
}

.pricing-header p {
    font-size: 1.1rem;
    margin-top: 16px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--primary);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pricing-card h3 {
    margin-bottom: 8px;
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text);
    margin: 16px 0;
}

.pricing-card .price span {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    margin: 24px 0;
}

.pricing-features li {
    padding: 8px 0;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.pricing-features li::before {
    content: '';
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    flex-shrink: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Privacy Section */
.privacy-section {
    padding: 100px 0;
    background: var(--bg-alt);
}

.privacy-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.privacy-text h2 {
    margin-bottom: 24px;
}

.privacy-text p {
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.privacy-visual {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.privacy-visual code {
    display: block;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-alt);
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
}

/* CTA Section */
.cta {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg) 0%, var(--primary) 200%);
}

.cta h2 {
    margin-bottom: 16px;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* Footer */
.footer {
    padding: 60px 0 40px;
    background: var(--text);
    color: rgba(255,255,255,0.7);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 60px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 16px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.6);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.85rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--surface);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 144, 164, 0.1);
}

.form-error {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 6px;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 6px;
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg-alt);
}

.auth-card {
    background: var(--surface);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 440px;
}

.auth-card h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card > p {
    text-align: center;
    margin-bottom: 32px;
}

.auth-divider {
    text-align: center;
    margin: 24px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.9rem;
}

/* Account Page */
.account-page {
    padding-top: 100px;
    min-height: 100vh;
}

.account-header {
    margin-bottom: 40px;
}

.account-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.account-sidebar {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    height: fit-content;
}

.account-nav a {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius);
    margin-bottom: 4px;
}

.account-nav a:hover,
.account-nav a.active {
    background: var(--bg-alt);
    color: var(--text);
}

.account-main {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.account-section {
    margin-bottom: 40px;
}

.account-section:last-child {
    margin-bottom: 0;
}

.account-section h2 {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Saved Rooms */
.rooms-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.room-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-alt);
    border-radius: var(--radius);
}

.room-info h4 {
    margin-bottom: 4px;
}

.room-info p {
    font-size: 0.85rem;
}

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

/* Chat Page */
.chat-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: var(--surface);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.chat-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.status-dot.disconnected {
    background: var(--error);
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
    padding: 24px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    max-width: 80%;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    line-height: 1.5;
}

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

.message.assistant {
    background: var(--surface);
    box-shadow: var(--shadow);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.system {
    align-self: center;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 8px 16px;
}

.chat-input-area {
    padding: 24px 0;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.chat-input-wrapper {
    display: flex;
    gap: 12px;
    background: var(--surface);
    padding: 12px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.chat-input-wrapper textarea {
    flex: 1;
    border: none;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    padding: 8px;
    background: transparent;
    min-height: 24px;
    max-height: 120px;
}

.chat-input-wrapper textarea:focus {
    outline: none;
}

.chat-input-wrapper button {
    padding: 12px 24px;
}

/* Connect Form */
.connect-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 60px 24px;
    text-align: center;
}

.connect-form h2 {
    margin-bottom: 12px;
}

.connect-form > p {
    margin-bottom: 32px;
}

.connect-form .form-group {
    text-align: left;
}

/* Legal Pages */
.legal-page {
    padding: 120px 0 80px;
}

.legal-page h1 {
    margin-bottom: 8px;
}

.legal-page .last-updated {
    color: var(--text-muted);
    margin-bottom: 48px;
}

.legal-page h2 {
    margin-top: 48px;
    margin-bottom: 16px;
}

.legal-page p,
.legal-page li {
    margin-bottom: 16px;
}

.legal-page ul {
    padding-left: 24px;
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-4 { margin-top: 16px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    h1 { font-size: 2.25rem; }
    .hero h1 { font-size: 2.5rem; }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .privacy-content {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 32px;
    }

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

    .auth-card {
        padding: 32px 24px;
    }
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-error {
    background: rgba(252, 129, 129, 0.1);
    color: #c53030;
    border: 1px solid rgba(252, 129, 129, 0.3);
}

.alert-success {
    background: rgba(104, 211, 145, 0.1);
    color: #276749;
    border: 1px solid rgba(104, 211, 145, 0.3);
}
