/* Nosi - SF Tech Startup Aesthetic */

/* Reset and base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0a0a0a;
    background-color: #fafafa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html[lang="zh"] body {
    font-family: 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    margin-bottom: 0.5em;
    font-weight: 600;
}

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

p {
    margin-bottom: 1em;
}

a {
    color: #0a0a0a;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.site-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    background-color: #fafafa;
}

.nav-container {
    max-width: 680px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0a0a0a;
}

.logo:hover {
    text-decoration: none;
}

.nav-link {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.nav-link:hover {
    color: #0a0a0a;
    text-decoration: none;
}

.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
}

.lang-link {
    color: #9ca3af;
    font-weight: 500;
    padding: 0.25rem 0.375rem;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
}

.lang-link:hover {
    color: #6b7280;
    text-decoration: none;
}

.lang-link.active {
    color: #0a0a0a;
    background-color: #f3f4f6;
}

.lang-sep {
    color: #d1d5db;
    user-select: none;
}

.main-content {
    flex: 1;
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}

.site-footer {
    border-top: 1px solid #e5e7eb;
    padding: 2rem 1.5rem;
    margin-top: auto;
}

.footer-container {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, transform 0.1s;
}

.btn-primary {
    background-color: #0a0a0a;
    color: #fff;
}

.btn-primary:hover {
    background-color: #262626;
    text-decoration: none;
}

.btn-secondary {
    background-color: #fff;
    color: #888;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

/* Hero section (home page) */
.hero {
    text-align: center;
    padding: 40px 0 20px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    margin-bottom: 0;
    line-height: 1.7;
}

/* Example section (home page) */
.example {
    margin: 1.5rem 0;
}

.prompt-block {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.prompt-prefix {
    font-family: 'JetBrains Mono', monospace;
    color: #6b7280;
    font-size: 1rem;
    user-select: none;
}

.prompt-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9375rem;
    color: #0a0a0a;
    margin: 0;
    line-height: 1.5;
}

.result-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
}

.result-time {
    font-size: 0.875rem;
    color: #6b7280;
}

.result-url {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 500;
    color: #0a0a0a;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.result-url:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

/* Chat animation (home page) */
.chat-container {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    padding-bottom: 1rem;
    height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-msg {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chat-msg:last-child {
    margin-bottom: 0;
}

.chat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    min-width: 24px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.chat-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: #0a0a0a;
    line-height: 1.5;
}

.chat-user .chat-text {
    color: #0a0a0a;
}

.chat-cursor {
    font-family: 'JetBrains Mono', monospace;
    color: #0a0a0a;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.chat-poem {
    padding-left: 2.25rem;
}

.chat-poem .chat-label {
    display: none;
}

.chat-poem .chat-text {
    font-style: italic;
    color: #374151;
}

.chat-url {
    justify-content: center;
    align-items: flex-start;
    flex-grow: 0;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.chat-url-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 500;
    color: #0a0a0a;
    background-color: #f5f5f5;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background-color 0.15s;
}

.chat-url-link:hover {
    background-color: #e5e7eb;
    text-decoration: none;
}

/* CTA section (home page) */
.cta-section {
    text-align: center;
    margin: 1.5rem 0 1rem;
}

/* Integrations line (home page) */
.integrations {
    text-align: center;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0;
}

/* Register page */
.register-section {
    max-width: 400px;
    margin: 0 auto;
}

.register-form {
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #0a0a0a;
}

.message {
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.message-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.message-success {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

/* Confirmation page */
.confirmation-section {
    text-align: center;
}

.next-steps {
    text-align: left;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.next-steps h2 {
    margin-bottom: 1rem;
}

.next-steps ol {
    margin-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.5rem;
}

/* Content page */
.content-article {
    max-width: 680px;
}

.content-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.content-header h1 {
    margin-bottom: 0.5rem;
}

.content-meta {
    color: #6b7280;
    font-size: 0.875rem;
}

.content-meta time {
    margin-right: 1rem;
}

.content-license {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.content-body {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.content-footer {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* Share grid layout */
.share-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 1fr;
    gap: 0.5rem;
}

.share-grid .btn {
    padding: 0.375rem 0.25rem;
    font-size: 0.8rem;
    font-weight: 400;
    font-family: inherit;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.content-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    font-family: inherit;
}

.copy-message {
    color: #15803d;
    margin-left: 1rem;
}

/* Author page */
.author-section {
    max-width: 680px;
}

.author-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.author-meta {
    color: #6b7280;
    font-size: 0.875rem;
}

.content-list {
    list-style: none;
}

.content-list-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.content-list-item:last-child {
    border-bottom: none;
}

.content-list-link {
    display: block;
    color: inherit;
}

.content-list-link:hover {
    text-decoration: none;
}

.content-list-link:hover h3 {
    color: #6b7280;
}

.content-list-link h3 {
    margin-bottom: 0.5rem;
    transition: color 0.15s;
}

.content-excerpt {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.content-list-link time {
    color: #9ca3af;
    font-size: 0.8rem;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.page-info {
    color: #6b7280;
}

.no-content {
    color: #6b7280;
    font-style: italic;
}

/* Code example (legacy - for other pages) */
.code-example {
    background-color: #18181b;
    color: #e4e4e7;
    border-radius: 8px;
    overflow-x: auto;
}

.code-example pre {
    padding: 1.25rem;
    margin: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.code-example code {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Quickstart section (legacy) */
.quickstart {
    background-color: #fff;
    border: 1px solid #e5e7eb;
    padding: 2rem;
    border-radius: 8px;
}

.quickstart h2 {
    margin-bottom: 1rem;
}

/* Features section (legacy) */
.features {
    margin-bottom: 3rem;
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
}

.feature h3 {
    margin-bottom: 0.5rem;
}

.feature p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 600px) {
    html {
        font-size: 15px;
    }

    .nav-right {
        gap: 0.75rem;
    }

    .lang-switcher {
        font-size: 0.75rem;
    }

    .hero {
        padding: 24px 0 16px;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

    .prompt-block {
        padding: 1rem;
    }

    .prompt-text {
        font-size: 0.875rem;
    }

    .result-block {
        flex-direction: column;
        gap: 0.75rem;
    }

    .chat-container {
        padding: 1rem;
        padding-bottom: 1rem;
        height: auto;
    }

    .chat-text {
        font-size: 0.85rem;
    }

    .chat-poem {
        padding-left: 1.75rem;
    }

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

    .quickstart {
        padding: 1rem;
    }

    .share-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .content-actions {
        flex-direction: column;
    }

    .content-actions .btn {
        text-align: center;
    }
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #fff;
    border-radius: 12px;
    padding: 2rem;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}

.modal-close:hover {
    color: #0a0a0a;
}

.modal-content h2 {
    margin-bottom: 1.25rem;
    font-size: 1.5rem;
}

.modal-subtitle {
    color: #6b7280;
    margin-bottom: 1rem;
}

.modal-label {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: #0a0a0a;
}

/* AI Rows Layout */
.ai-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.ai-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ai-row-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    width: 2.5rem;
    flex-shrink: 0;
}

/* AI Card buttons */
.ai-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.ai-btn:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-btn.active {
    background-color: #0a0a0a;
    border-color: #0a0a0a;
    color: #fff;
}

/* Prompt copy container */
.prompt-copy-container {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    margin-bottom: 0.5rem;
}

.prompt-copy-text {
    flex: 1;
    background-color: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #374151;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
    height: 11rem;
    overflow-y: auto;
}

.copy-btn {
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.copy-feedback {
    display: block;
    font-size: 0.8rem;
    color: #15803d;
    min-height: 1.25rem;
}

.modal-links {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-bottom: 0;
    margin-top: 0.25rem;
}

.modal-links a {
    color: #6b7280;
    text-decoration: underline;
}

.modal-links a:hover {
    color: #0a0a0a;
}

/* Two-step modal layout */
.modal-step {
    margin-bottom: 0;
}

.step-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #0a0a0a;
    margin-bottom: 0.75rem;
}

.step-divider {
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

/* Email form (Step 1) */
.email-form {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.email-input {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    background-color: #fff;
}

.email-input:focus {
    outline: none;
    border-color: #0a0a0a;
}

.email-submit {
    padding: 0.625rem 1.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.email-feedback {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    height: 1.25rem;
    margin-top: 0.375rem;
}

.email-feedback.error {
    color: #dc2626;
}

/* Email sent confirmation */
.email-sent-text {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0;
}

.email-sent-text .checkmark {
    color: #16a34a;
    margin-right: 0.25rem;
}

/* Modal mobile responsive */
@media (max-width: 600px) {
    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .ai-row-label {
        width: 2rem;
        font-size: 0.65rem;
    }

    .ai-btn {
        padding: 0.4rem 0.25rem;
        font-size: 0.7rem;
    }

    .prompt-copy-container {
        flex-direction: column;
    }

    .prompt-copy-text {
        font-size: 0.75rem;
    }

    .email-form {
        flex-direction: column;
    }

    .email-submit {
        width: 100%;
    }
}

/* WeChat QR Modal */
.wechat-modal {
    max-width: 320px;
    text-align: center;
}

.wechat-modal h2 {
    margin-bottom: 0.5rem;
}

.wechat-instructions {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
}

.qr-container img {
    display: block;
}
