:root {
    --pure-white: #ffffff;
    --snow: #fafafa;
    --light-gray: #e5e5e5;
    --border-light: #d4d4d4;
    --silver: #a3a3a3;
    --stone: #737373;
    --mid-gray: #525252;
    --button-dark: #404040;
    --near-black: #262626;
    --pure-black: #000000;
    --darkest: #090909;
    --focus-ring: rgba(59, 130, 246, 0.5);
    
    --radius-pill: 9999px;
    --radius-container: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    background-color: var(--pure-white);
    color: var(--pure-black);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display-text {
    font-family: 'SF Pro Rounded', system-ui, sans-serif;
    font-weight: 500;
    letter-spacing: normal;
}

a {
    color: var(--pure-black);
    text-decoration: none;
}

button {
    font-family: inherit;
}

.btn-black-pill {
    background-color: var(--pure-black);
    color: var(--pure-white);
    border: none;
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 400;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-gray-pill {
    background-color: var(--light-gray);
    color: var(--near-black);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    font-size: 16px;
    cursor: pointer;
}

.btn-white-pill {
    background-color: var(--pure-white);
    color: var(--button-dark);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    font-size: 16px;
    cursor: pointer;
}

input:focus, button:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--focus-ring);
}

textarea:focus {
    outline: none;
    box-shadow: none;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: transparent;
}

.nav-left, .nav-right, .nav-center {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'SF Pro Rounded', system-ui;
    font-size: 24px;
    font-weight: 500;
}

.nav-brand img {
    height: 28px;
}

.nav-links a {
    font-size: 16px;
    color: var(--pure-black);
}

.search-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--pure-white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    width: 300px;
}

.search-pill:focus-within {
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-pill svg {
    width: 16px;
    height: 16px;
    stroke: var(--stone);
}

.search-pill input {
    border: none;
    background: transparent;
    font-size: 14px;
    width: 100%;
}

.search-pill input::placeholder {
    color: var(--silver);
}

.search-pill input:focus {
    box-shadow: none;
}

.hero-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 88px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.hero-image {
    width: 180px;
    margin-bottom: 32px;
    border-radius: 50px;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--stone);
    margin-bottom: 16px;
}

.hero-title {
    font-size: 48px;
    line-height: 1;
    margin-bottom: 40px;
}

.code-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--pure-white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-pill);
    padding: 12px 24px;
    margin-bottom: 16px;
}

.code-pill code {
    font-family: ui-monospace, monospace;
    font-size: 16px;
    color: var(--pure-black);
}

.copy-btn {
    color: var(--stone);
    cursor: pointer;
    display: flex;
}

.hero-caption {
    font-size: 14px;
    color: var(--stone);
}

.hero-caption a {
    color: var(--pure-black);
    text-decoration: underline;
}

.feature-section {
    display: flex;
    max-width: 1024px;
    margin: 0 auto 112px auto;
    padding: 0 40px;
    gap: 64px;
    align-items: center;
}

.feature-text {
    flex: 1;
}

.feature-text h2 {
    font-size: 36px;
    margin-bottom: 24px;
}

.feature-text p {
    font-size: 18px;
    color: var(--stone);
    margin-bottom: 24px;
}

.inline-code-pill {
    display: inline-block;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-pill);
    padding: 8px 16px;
    margin-bottom: 24px;
}

.inline-code-pill code {
    font-family: ui-monospace, monospace;
    font-size: 14px;
}

.see-more-link {
    display: block;
    color: var(--pure-black);
    font-weight: 500;
}

.feature-visual {
    flex: 1;
}

.mock-terminal {
    background: var(--snow);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-container);
    padding: 24px;
}

.mock-dots {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--light-gray);
}

.mock-content p {
    font-family: ui-monospace, monospace;
    font-size: 14px;
    margin-bottom: 8px;
}

.mock-content .cmd {
    color: var(--pure-black);
}

.mock-content .output.muted {
    color: var(--silver);
}

.mock-content .output.success {
    color: var(--stone);
}

.check-list {
    list-style: none;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 16px;
    color: var(--near-black);
}

.check-list svg {
    width: 20px;
    height: 20px;
    stroke: var(--pure-black);
}

.pricing-cards {
    display: flex;
    gap: 24px;
}

.pricing-card {
    flex: 1;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-container);
    padding: 32px;
    background: var(--pure-white);
}

.pricing-card .tier {
    font-family: 'SF Pro Rounded', system-ui;
    font-size: 24px;
    margin-bottom: 16px;
}

.pricing-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.pricing-card p {
    color: var(--stone);
    font-size: 14px;
    margin-bottom: 32px;
}

.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.price {
    font-size: 16px;
    color: var(--stone);
}

.price strong {
    font-size: 30px;
    color: var(--pure-black);
    font-family: 'SF Pro Rounded', system-ui;
    font-weight: 500;
}

.center-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.padlock-icon {
    width: 120px;
    height: 120px;
    stroke: var(--light-gray);
}

.bottom-cta {
    text-align: center;
    padding: 88px 20px;
}

.bottom-cta h2 {
    font-size: 36px;
    margin-bottom: 32px;
}

.home-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
    border-top: 1px solid var(--light-gray);
    margin-top: 40px;
}

.footer-left {
    color: var(--stone);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--stone);
    font-size: 14px;
}

.docs-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 20px;
    min-height: calc(100vh - 200px);
}

.docs-container .display-text {
    font-size: 48px;
    margin-bottom: 48px;
}

.doc-section {
    margin-bottom: 48px;
}

.doc-section h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.doc-section p {
    color: var(--stone);
    margin-bottom: 16px;
    font-size: 16px;
}

.doc-list {
    list-style: none;
}

.doc-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 12px;
    color: var(--stone);
    line-height: 1.5;
}

.doc-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--pure-black);
}

.doc-list li strong {
    color: var(--pure-black);
}

.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: var(--pure-white);
}

.sidebar {
    width: 260px;
    background-color: var(--snow);
    border-right: 1px solid var(--light-gray);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.new-chat-btn {
    width: 100%;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.session-item {
    padding: 12px 16px;
    border-radius: var(--radius-container);
    cursor: pointer;
    font-size: 14px;
    color: var(--stone);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid transparent;
}

.session-item:hover {
    background-color: var(--light-gray);
}

.session-item.active {
    background-color: var(--pure-white);
    color: var(--pure-black);
    border: 1px solid var(--light-gray);
    font-weight: 500;
}

.delete-session {
    opacity: 0;
    font-size: 18px;
    line-height: 1;
}

.session-item:hover .delete-session {
    opacity: 1;
}

.delete-session:hover {
    color: var(--pure-black);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--pure-white);
    width: 100%;
}

.mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--light-gray);
}

.chat-window {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
    padding-bottom: 140px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
}

.message {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 800px;
}

.message .label {
    font-family: 'SF Pro Rounded', system-ui;
    font-weight: 500;
    font-size: 14px;
    color: var(--stone);
}

.user-message {
    align-items: flex-end;
}

.user-message .label {
    text-align: right;
}

.user-message .content {
    background-color: var(--snow);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-container);
    padding: 7px 10px;
    color: var(--pure-black);
    display: inline-block;
    max-width: 80%;
    word-break: break-word;
    text-align: left;
}

.ai-message {
    align-items: flex-start;
}

.ai-message .content {
    color: var(--pure-black);
    width: 100%;
    max-width: 80%;
}

.ai-message .content p {
    margin-bottom: 16px;
}

.ai-message .content p:last-child {
    margin-bottom: 0;
}

.ai-message .content pre {
    background-color: var(--snow);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-container);
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}

.ai-message .content code {
    font-family: ui-monospace, monospace;
    font-size: 14px;
}

.chat-image {
    max-width: 300px;
    border-radius: var(--radius-container);
    border: 1px solid var(--light-gray);
    margin-bottom: 12px;
}

.input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 40px;
    background: linear-gradient(0deg, var(--pure-white) 80%, transparent);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    background: var(--pure-white);
    border: 1px solid var(--light-gray);
    border-radius: 24px;
    display: flex;
    align-items: flex-end;
    padding: 8px 16px;
    gap: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrapper:focus-within {
    border-color: var(--silver);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.command-popup {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    width: 100%;
    background: var(--pure-white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-container);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}

.command-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.command-item:last-child {
    border-bottom: none;
}

.command-item.selected, .command-item:hover {
    background-color: var(--snow);
}

.command-name {
    font-weight: 500;
    color: var(--pure-black);
    font-size: 14px;
}

.command-desc {
    font-size: 12px;
    color: var(--stone);
}

#user-input {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    max-height: 200px;
    padding: 10px 0;
    margin: 0;
    font-family: ui-sans-serif, system-ui;
    font-size: 16px;
    color: var(--pure-black);
    overflow-y: hidden;
    scrollbar-width: none;
    line-height: 24px;
    height: 44px;
    box-sizing: border-box;
}

#user-input::-webkit-scrollbar {
    display: none;
}

#user-input::placeholder {
    color: var(--silver);
    line-height: 24px;
}

.icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--stone);
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    width: 32px;
}

.icon-btn:hover {
    color: var(--pure-black);
}

.send-arrow {
    background-color: var(--pure-black);
    color: var(--pure-white);
    border-radius: var(--radius-pill);
    width: 32px;
    height: 32px;
    font-size: 16px;
    margin-bottom: 6px;
}

.send-arrow:hover {
    color: var(--pure-white);
}

#image-preview-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 12px;
    position: relative;
    display: inline-block;
}

#image-preview {
    height: 60px;
    border-radius: var(--radius-container);
    border: 1px solid var(--light-gray);
}

#remove-image-btn {
    position: absolute;
    top: -8px;
    left: 52px;
    background: var(--pure-black);
    color: var(--pure-white);
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--silver);
    border-radius: 50%;
    animation: typing 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 typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@media (max-width: 768px) {
    .main-nav {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }

    .nav-center {
        width: 100%;
    }

    .search-pill {
        width: 100%;
    }

    .hero-title {
        font-size: 36px;
    }

    .feature-section {
        flex-direction: column;
        gap: 32px;
        padding: 0 20px;
        margin-bottom: 64px;
    }

    .pricing-cards {
        flex-direction: column;
    }

    .home-footer {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        z-index: 1000;
        box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    }

    .sidebar.open {
        left: 0;
    }

    .mobile-header {
        display: flex;
    }
    
    .input-area {
        padding: 16px 12px;
        padding-bottom: 70px;
    }

    .input-wrapper {
        padding: 6px 12px;
    }
    
    .chat-window {
        padding: 20px 16px;
        padding-bottom: 140px;
    }

    .user-message .content, .ai-message .content {
        max-width: 95%;
    }
}