:root {
    --bg-primary: #09090b;
    --bg-secondary: #0c0c0e;
    --bg-sidebar: #050505;
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --accent: #2563eb;
    --accent-glow: rgba(37, 99, 235, 0.4);
    --accent-hover: #3b82f6;
    --border: rgba(39, 39, 42, 0.5);
    --glass-bg: rgba(9, 9, 11, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --font-standard: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-lg: 16px;
    --radius-md: 8px;
    --radius-sm: 6px;
}

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

body {
    font-family: var(--font-standard);
    font-size: 16px;
    /* Adhering to mobile-typography.md min sizes */
    line-height: 1.5;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* App Container */
.app-container {
    display: flex;
    height: 100dvh;
    width: 100vw;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 280px;
    height: 100dvh;
    background: var(--bg-sidebar);
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    transition: var(--transition);
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar.hidden {
    transform: translateX(-100%);
    opacity: 1;
    /* Keep visible for slide effect */
    pointer-events: none;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 900;
    opacity: 1;
    transition: opacity 0.3s ease;
    display: none;
    /* Hidden by default on desktop */
}

.sidebar-overlay.active {
    display: block;
    /* Shown only on mobile when sidebar is open */
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

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

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.logo-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.logo-icon-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.header-logo-img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}

.sidebar-actions {
    padding: 20px;
}

.new-chat-btn {
    width: 100%;
    min-height: 44px;
    /* Touch target */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-md);
    color: #60a5fa;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.new-chat-btn:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.35);
}

.new-chat-btn svg {
    width: 14px;
    height: 14px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
}

.sidebar-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 10px;
    font-weight: 600;
    color: #52525b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 12px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    min-height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: rgba(39, 39, 42, 0.6);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(39, 39, 42, 0.8);
    color: var(--text-primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 14px;
}

/* Cap SVG icon size inside nav items and settings panel */
.nav-item svg,
.settings-panel .nav-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid var(--border);
}

/* Sidebar Logout Button */
.logout-btn-sidebar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    margin-top: 8px;
    width: 100%;
    min-height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.logout-btn-sidebar:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
}

.logout-btn-sidebar.hidden {
    display: none;
}

.logout-btn-sidebar svg {
    width: 16px;
    height: 16px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    min-height: 48px;
}

.user-profile:hover {
    background: #222;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
}

.profile-status {
    font-size: 11px;
    color: #3f3f46;
}

/* Coach Settings Panel */
.settings-panel {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ===== MAIN CONTENT ===== */
.chat-container {
    flex: 1;
    display: none;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    overflow-y: auto;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
    padding-bottom: 120px;
    /* Space for input */
}

.chat-container.active {
    display: flex;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-primary);
    position: relative;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    margin-left: 280px;
    height: 100dvh;
    overflow: hidden;
    transition: margin-left 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(39, 39, 42, 0.4);
    z-index: 10;
}

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

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-logo-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.mobile-menu-btn {
    display: none;
    /* Hidden on desktop by default */
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* Welcome Screen */
.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    overflow-y: auto;
    z-index: 5;
}

.welcome-screen.hidden {
    display: none;
}

.welcome-content {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.welcome-title {
    font-size: 44px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -0.8px;
}

.welcome-subtitle {
    font-size: 28px;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.welcome-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    transition: var(--transition);
    animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    margin-bottom: 8px;
}

.message.centered-message {
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    background: transparent;
    border: none;
}

.message.centered-message .message-avatar {
    margin-bottom: 16px;
    width: 48px;
    height: 48px;
    font-size: 18px;
}

.message.centered-message .message-text {
    font-size: 20px;
    font-weight: 500;
}

.bot-message {
    background: rgba(18, 18, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.user-message {
    background: transparent;
    border: 1px solid rgba(39, 39, 42, 0.5);
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 14px;
}

.bot-message .message-avatar {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.user-message .message-avatar {
    background: var(--border);
    color: var(--text-secondary);
}

.message-content {
    flex: 1;
    overflow-x: hidden;
    /* Prevent horizontal scroll on code blocks */
}

.message-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    width: fit-content;
    border-radius: 16px;
    margin-bottom: 16px;
    margin-left: 0;
    /* Align left like bot message */
    animation: slideUp 0.3s ease-out;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-secondary);
    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);
    }
}

/* Input Container */
.input-container {
    padding: 16px 24px 24px;
    background: var(--bg-primary);
    border-top: 1px solid rgba(39, 39, 42, 0.4);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    width: 100%;
}

.input-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    border: 1px solid rgba(39, 39, 42, 0.7);
    border-radius: 12px;
    padding: 8px 12px;
    transition: var(--transition);
}

.input-wrapper:focus-within {
    border-color: var(--accent-hover);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.message-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    /* Critical rule: 16px minimum prevents automatic Safari zoom on focus */
    padding: 6px 4px;
    background: transparent;
    color: var(--text-primary);
}

.send-btn,
.attach-btn {
    min-width: 36px;
    height: 36px;
    padding: 8px;
    background: transparent;
    border-radius: 10px;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.send-btn svg,
.attach-btn svg {
    width: 20px;
    height: 20px;
}

.send-btn {
    background: var(--accent);
    color: #fff;
}

.send-btn:hover:not(:disabled) {
    background: var(--accent-hover);
}

.attach-btn:hover {
    color: var(--text-primary);
    background: var(--border);
}

/* Authentication Overlay */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: var(--transition);
    padding: 20px;
}

.auth-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.auth-modal {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    animation: modalAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-close-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close-icon:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.modal-close-icon svg {
    width: 20px;
    height: 20px;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.auth-header {
    margin-bottom: 28px;
}

.auth-header h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin-bottom: 8px;
    color: #f4f4f5;
}

.auth-header p {
    color: #71717a;
    font-size: 14px;
    line-height: 1.5;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group.hidden {
    display: none;
}

.input-group label {
    font-size: 12px;
    font-weight: 500;
    color: #71717a;
    margin-bottom: 4px;
    letter-spacing: 0.1px;
}

.input-group.centered label {
    text-align: center;
    margin-left: 0;
}

.input-group input:not([type="checkbox"]) {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(63, 63, 70, 0.8);
    border-radius: var(--radius-md);
    color: #e4e4e7;
    font-size: 14px;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    user-select: none;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.header-with-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.modal-options {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.options-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #52525b;
    margin-bottom: 12px;
}

.options-grid {
    display: flex;
    gap: 12px;
}

.option-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.option-btn.primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-hover);
    border-color: rgba(37, 99, 235, 0.2);
}

.option-btn.primary:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.4);
}

.option-btn.secondary {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border-color: var(--border);
}

.option-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.modal-close-btn {
    margin-top: 24px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 8px;
    letter-spacing: 0.1px;
}

.auth-submit-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.auth-submit-btn:active {
    opacity: 0.9;
}

.auth-footer {
    margin-top: 20px;
    font-size: 13px;
    color: #52525b;
}

.auth-footer a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Info Point & Tooltip */
.info-point {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.info-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    cursor: help;
    transition: var(--transition);
}

.info-icon:hover {
    color: var(--accent);
}

.info-tooltip {
    position: absolute;
    bottom: 150%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 240px;
    padding: 16px;
    background: #18181b;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.info-point:hover .info-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.time-input {
    appearance: none;
    -webkit-appearance: none;
    color-scheme: dark;
}

.modal-sm {
    max-width: 450px;
}

.input-hint {
    font-size: 12px;
    color: #52525b;
    margin-top: 6px;
    text-align: center;
    line-height: 1.5;
}

/* ===== LANDING PAGE ===== */
.landing-container {
    width: 100vw;
    height: 100dvh;
    overflow-y: auto;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
}

.landing-container.hidden {
    display: none !important;
}

/* Landing Nav */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 48px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-logo-img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.landing-logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.landing-login-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.landing-login-btn:hover {
    color: var(--text-primary);
}

.landing-cta-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    /* Pillow shape for fitts law */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.landing-cta-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 4px 15px var(--accent-glow);
    transform: translateY(-2px);
}

/* Hero Section */
.landing-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 48px;
    min-height: 70vh;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-cta {
    font-size: 18px;
    padding: 16px 36px;
}

/* Abstract Interface Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.abstract-interface {
    width: 380px;
    height: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    position: relative;
    overflow: hidden;
}

.abstract-interface::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.1) 0%, transparent 60%);
    z-index: 0;
}

.abstract-message {
    min-height: 48px;
    height: auto;
    border-radius: 12px;
    position: relative;
    z-index: 1;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.ai-message {
    background: rgba(18, 18, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 85%;
    color: #e4e4e7;
}

.user-message {
    background: transparent;
    border: 1px solid rgba(39, 39, 42, 0.8);
    width: 75%;
    align-self: flex-end;
    color: var(--text-secondary);
}

.abstract-input {
    margin-top: auto;
    height: 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 20px;
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.input-placeholder {
    font-size: 12px;
    color: #52525b;
}

/* Section Common */
.landing-comparison,
.landing-features,
.landing-pricing {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 48px;
}

.landing-section-title {
    font-size: 40px;
    font-weight: 700;
    text-align: center;
    letter-spacing: -1px;
    margin-bottom: 60px;
}

/* Problem / Solution Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.problem-card,
.solution-card {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #ef4444;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent);
}

.card-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: block;
}

.card-label.problem {
    color: #f87171;
}

.card-label.solution {
    color: #60a5fa;
}

.comparison-grid h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.3;
}

.comparison-grid p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.comparison-list {
    list-style: none;
    margin-top: 24px;
}

.comparison-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 16px;
}

.x-icon {
    color: #ef4444;
    font-weight: bold;
}

.check-icon {
    color: var(--accent);
    font-weight: bold;
}

/* Features Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 40px 32px;
    text-align: center;
    background: rgba(39, 39, 42, 0.1);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

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

.feature-card h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Pricing Section */
.landing-pricing {
    display: flex;
    justify-content: center;
}

.pricing-card {
    max-width: 500px;
    width: 100%;
    background: linear-gradient(145deg, var(--bg-secondary) 0%, #18181b 100%);
    padding: 56px 40px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(37, 99, 235, 0.3);
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.pricing-card h2 {
    font-size: 24px;
    margin-bottom: 24px;
}

.price-amount {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 16px;
}

.price-amount span {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: normal;
}

.pricing-desc {
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.pricing-cta {
    width: 100%;
    font-size: 18px;
    padding: 16px;
}

/* Footer */
.landing-footer {
    border-top: 1px solid var(--border);
    padding: 40px 48px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        width: 80vw;
        max-width: 320px;
        transform: translateX(-100%);
        pointer-events: none;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        pointer-events: auto;
    }



    .sidebar-overlay.active {
        display: block;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu-btn.hidden {
        display: none;
    }

    /* Main Content */
    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .top-nav {
        padding: 12px 16px;
    }

    .message {
        padding: 12px 16px;
    }

    /* Typography Adjustments */

    /* Landing Page Mobile Layout */
    .landing-comparison,
    .landing-features,
    .landing-pricing,
    .landing-hero {
        padding: 40px 20px;
        flex-shrink: 0;
    }

    .landing-hero {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-visual {
        justify-content: center;
        width: 100%;
    }

    .abstract-interface {
        width: 100%;
        max-width: 320px;
        height: 350px;
    }

    .comparison-grid,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .landing-nav {
        padding: 20px;
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }

    /* Landing Page Mobile Typography */
    .hero-title {
        font-size: 36px;
        line-height: 1.15;
    }

    .hero-subtitle {
        font-size: 18px;
        line-height: 1.5;
        color: var(--text-secondary);
    }

    .landing-section-title {
        font-size: 28px;
        line-height: 1.25;
    }

    .problem-card h3,
    .solution-card h3,
    .solution-card h2,
    .pricing-card h2 {
        font-size: 24px;
        line-height: 1.3;
    }

    .feature-card h4 {
        font-size: 20px;
    }

    .problem-card p,
    .solution-card p,
    .comparison-list li,
    .feature-card p,
    .pricing-desc,
    .abstract-message {
        font-size: 16px;
        line-height: 1.5;
    }

    .landing-cta-btn,
    .landing-login-btn {
        font-size: 16px;
        padding: 14px 24px;
    }

    .abstract-message {
        font-size: clamp(13px, 0.85rem, 16px);
    }

    /* Coach Interface Typography */
    .welcome-title {
        font-size: 32px;
        line-height: 1.2;
    }

    .welcome-subtitle {
        font-size: 20px;
        line-height: 1.4;
    }

    .welcome-description {
        font-size: 16px;
        line-height: 1.5;
    }

    .message-content {
        font-size: 16px;
        line-height: 1.5;
    }

    #userInput,
    .chat-input,
    input,
    textarea {
        font-size: 16px !important;
        /* Prevents iOS Safari auto-zoom bug completely */
    }

    .section-title {
        font-size: 14px;
    }

    .chat-item-title,
    .nav-item span {
        font-size: 16px;
    }

    .onboarding-label {
        font-size: 24px;
        line-height: 1.3;
    }

    .input-container {
        padding: 16px;
        /* Essential to prevent iPhone home-bars from covering in-chat input */
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }

    .auth-modal {
        /* Fix login background scrolling/scaling on mobile */
        padding: 24px 20px;
        max-height: 90dvh;
        overflow-y: auto;
        /* Ensure auth modal scales properly without hitting viewport edges */
        width: calc(100% - 32px);
    }

    .auth-header h2 {
        font-size: 24px;
    }
}

/* Keyframes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}