/* ===== PAPER-FIRST DESIGN SYSTEM ===== */
/* Base Reset & Document Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Document-style base */
html {
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    background: #ffffff;
    color: #000000;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== TYPOGRAPHY HIERARCHY ===== */
h1 {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    border-bottom: 3px solid #000;
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    margin-top: 1.5rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

h4 {
    font-size: 1.1rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

/* ===== DOCUMENT LAYOUT ===== */
.container {
    background: #ffffff;
    min-height: 100vh;
    position: relative;
}

/* Header as Masthead */
.header {
    border-bottom: 3px solid #000;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.header-main {
    margin-bottom: 10px;
    overflow: hidden; /* clearfix */
}

.hamburger-menu {
    float: left;
    margin-right: 15px;
    margin-top: 5px;
}

.header-main h1 {
    float: left;
    margin: 0;
}

select.language-selector {
    padding: 3px 6px;
    border: 3px solid #000;
    background: #fff;
    color: #000;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    width: 100px;
    margin-bottom: 0;
    border-radius: 0;
    -webkit-border-radius: 0;
    -moz-border-radius: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

select.language-selector:focus {
    outline: 2px solid #000;
}

.header-actions {
    float: right;
    margin-top: 3px;
    display: flex;
    align-items: center;
}

.header-actions > * {
    margin-left: 10px;
}

.header-actions > *:first-child {
    margin-left: 0;
}

/* ===== PRINT-STYLE FORMS ===== */
input[type="text"],
input[type="email"],
input[type="password"],
select {
    width: 100%;
    padding: 10px;
    border: 2px solid #000;
    background: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 10px;
    box-sizing: border-box;
    line-height: 1.2;
    height: 44px;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #000;
    background: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 10px;
    box-sizing: border-box;
    line-height: 1.2;
    min-height: 44px;
    resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid #000;
    outline-offset: 2px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* ===== PAPER-STYLE BUTTONS ===== */
button,
.btn {
    padding: 10px 20px;
    border: 3px solid #000;
    background: #ffffff;
    color: #000;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: none;
}

button:hover,
.btn:hover {
    background: #000;
    color: #fff;
}

button:active,
.btn:active {
    transform: translate(1px, 1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary action buttons */
.primary-btn {
    background: #000;
    color: #fff;
    padding: 15px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.1s;
}

.primary-btn:hover {
    background: #fff;
    color: #000;
}

/* Danger buttons */
.danger-btn {
    border-color: #000;
    background: #fff;
    position: relative;
}

.danger-btn::before {
    content: "[!] ";
}

.danger-btn:hover {
    background: #000;
    color: #fff;
}

/* ===== ACCOUNT PANEL - FORM STYLE ===== */
.account-btn {
    display: inline-block;
    position: relative;
}

.account-btn span {
    display: inline;
    vertical-align: middle;
}

.account-icon {
    font-family: monospace;
    font-size: 0.75rem;
    margin-right: 5px;
}

.account-text {
    font-weight: bold;
    margin-right: 5px;
}

.account-state {
    font-size: 0.875rem;
    font-weight: bold;
}

.account-panel {
    margin-top: 20px;
    border: 3px solid #000;
    background: #ffffff;
    padding: 0;
}

.account-header {
    padding: 20px;
    border-bottom: 2px solid #000;
    background: #f8f8f8;
    overflow: hidden; /* clearfix */
}

.user-info {
    float: left;
}

.user-info .user-avatar {
    float: left;
    margin-right: 20px;
}

.user-info .user-details {
    float: left;
    margin-top: 10px;
}

.logout-btn {
    float: right;
    margin-top: 10px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border: 2px solid #000;
    background: #000;
    color: #fff;
    text-align: center;
    line-height: 44px; /* height - border for vertical centering */
    font-weight: bold;
    font-size: 1.5rem;
}

.user-status {
    font-family: monospace;
    font-size: 0.875rem;
}

.user-status::before {
    content: "[STATUS: ";
}

.user-status::after {
    content: "]";
}

/* Settings sections as form pages */
.settings-section {
    padding: 20px;
    border-bottom: 1px solid #ccc;
}

.settings-section:last-child {
    border-bottom: none;
}

.cloud-settings {
    background: #f0f8ff;
    border: 2px dashed #000;
}

.cloud-settings h4 {
    color: #000;
}

.settings-section h4 {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 15px;
    font-size: 1rem;
}

/* ===== CHAT INTERFACE - TRANSCRIPT STYLE ===== */
.chat-container {
    border: 3px solid #000;
    background: #ffffff;
    margin-top: 20px;
    position: relative;
    height: calc(100vh - 200px);
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 15px 20px;
    border-bottom: 2px solid #000;
    background: #f8f8f8;
    position: relative;
    min-height: 60px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.conversation-info {
    overflow: hidden; /* clearfix */
}

.conversation-title {
    float: left;
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.conversation-info .conversation-actions {
    float: right;
    margin-top: 2px;
}

.conversation-info .conversation-actions .btn {
    margin-left: 10px;
    font-size: 0.875rem;
    padding: 8px 15px;
}

.chat-messages {
    padding: 20px;
    overflow-y: auto;
    background: #ffffff;
    flex: 1;
    min-height: 300px;
    box-sizing: border-box;
}

/* Message styling as transcript */
.message {
    margin-bottom: 20px;
    padding: 15px;
    border-left: 4px solid #000;
}

.message.user {
    background: #f8f8f8;
    margin-left: 40px;
}

.message.assistant {
    background: #ffffff;
    margin-right: 40px;
}

.message.error {
    border-left-width: 6px;
    background: #f8f8f8;
}

.message.error::before {
    content: "[ERROR] ";
    font-weight: bold;
    font-family: monospace;
}

.message.system {
    border-left-style: dashed;
    font-style: italic;
}

.message strong {
    display: block;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.message-content {
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
}

/* Input section as form */
.input-section {
    padding: 20px;
    border-top: 3px solid #000;
    background: #f8f8f8;
    position: relative;
    min-height: 100px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.input-container {
    overflow: hidden; /* clearfix */
}

#messageInput {
    width: 75%;
    float: left;
    height: 80px;
    resize: vertical;
    font-family: inherit;
    margin-right: 10px;
    box-sizing: border-box;
    vertical-align: top;
}

#sendButton {
    width: 22%;
    float: right;
    height: 80px;
    box-sizing: border-box;
    vertical-align: top;
}

/* ===== STATUS INDICATORS ===== */
.loading {
    text-align: center;
    padding: 40px;
    font-style: italic;
}

.loading::before {
    content: "[PROCESSING] ";
    font-family: monospace;
    font-style: normal;
    font-weight: bold;
}

.status-message {
    padding: 10px 15px;
    border: 2px solid #000;
    margin: 10px 0;
    font-weight: bold;
    background: #f8f8f8;
    display: none; /* Hidden by default */
}

.status-message:not(:empty) {
    display: block; /* Show when there's content */
}

.status-message.success::before {
    content: "[SUCCESS] ";
    font-family: monospace;
}

.status-message.error::before {
    content: "[ERROR] ";
    font-family: monospace;
}

/* ===== CONVERSATION SIDEBAR - FILE CABINET STYLE ===== */
.hamburger-menu {
    width: 50px;
    height: 40px;
    border: 3px solid #000;
    background: #fff;
    cursor: pointer;
    position: relative;
    padding: 9px 8px;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    background: #000;
    width: 100%;
    margin-bottom: 4px;
}

.hamburger-menu span:last-child {
    margin-bottom: 0;
}

.hamburger-menu:hover span {
    background: #fff;
}

.conversation-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 350px;
    height: 100vh;
    background: #ffffff;
    border-right: 4px solid #000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.conversation-sidebar:not(.hidden) {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 999;
}

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

.sidebar-header {
    padding: 20px;
    border-bottom: 3px solid #000;
    background: #f8f8f8;
    overflow: hidden; /* clearfix */
    position: relative;
}

.sidebar-header h3 {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 1.25rem;
    margin: 0;
    float: left;
    line-height: 35px; /* Match button height for alignment */
}

.sidebar-actions {
    float: right;
}

.sidebar-actions button {
    vertical-align: top;
}

.sidebar-new-chat {
    padding: 15px 20px;
    border-bottom: 2px solid #000;
    background: #f8f8f8;
}

.new-chat-btn {
    padding: 12px 20px;
    font-size: 1rem;
    width: 100%;
    font-weight: bold;
}

/* New conversation button text is set dynamically via JavaScript to support translations */

.sidebar-close {
    width: 35px;
    height: 35px;
    border: 3px solid #000;
    background: #fff;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    line-height: 29px; /* Centered within the border box */
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.conversation-list {
    padding: 0;
    overflow-y: auto;
    height: calc(100vh - 220px);
}

.conversation-item {
    padding: 15px 20px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
}

.conversation-item:hover {
    background: #f8f8f8;
}

.conversation-item.active {
    background: #f0f0f0;
}

.conversation-item.active::before {
    content: "▶ ";
    position: absolute;
    left: 5px;
    font-weight: bold;
}

.conversation-title {
    font-weight: bold;
    margin: 0;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    order: 1;
}

.conversation-meta {
    font-size: 0.875rem;
    font-family: monospace;
    color: #666;
    margin: 0;
    order: 2;
    display: flex;
    gap: 15px;
    align-items: center;
}

.conversation-meta .message-count::after {
    content: " • ";
    margin: 0 5px;
}

.conversation-meta .last-activity {
    font-style: italic;
}

.conversation-actions {
    opacity: 0.7;
    order: 3;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.conversation-item:hover .conversation-actions {
    opacity: 1;
}

.conversation-edit-btn,
.conversation-delete-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-width: 2px;
    margin: 0 8px 0 0;
    flex-shrink: 0;
}

.conversation-delete-btn {
    margin-right: 0;
}

.conversation-edit-btn {
    background: #fff;
    color: #000;
}

.conversation-delete-btn {
    background: #fff;
    color: #000;
}

.conversation-edit-btn:hover {
    background: #000;
    color: #fff;
}

.conversation-delete-btn:hover {
    background: #000;
    color: #fff;
}

/* ===== ACCOUNT FOOTER ===== */
.account-footer {
    padding: 15px 20px;
    background: #f0f0f0;
    border-top: 2px solid #000;
    text-align: center;
}

.sync-status {
    font-family: monospace;
    font-size: 0.875rem;
    font-weight: bold;
    padding: 8px 12px;
    background: #f8f8f8;
    border: 1px dashed #666;
    display: inline-block;
    color: #333;
}

/* ===== VERSION FOOTER ===== */
.version-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #000;
    text-align: center;
    font-size: 0.875rem;
    font-family: monospace;
}

.footer-link, .debug-link {
    color: #0066cc;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-link:hover, .debug-link:hover {
    text-decoration: underline;
}

.footer-divider {
    color: #999;
    margin: 0 0.25rem;
}

.debug-status {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #000;
    background: #000;
    color: #fff;
    margin-left: 10px;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding-bottom: 10px;
    }
    
    .hamburger-menu {
        float: left;
        display: block;
        margin: 0 0 10px 0;
    }
    
    .header-main h1 {
        float: none;
        display: block;
        text-align: center;
        padding-bottom: 10px;
    }
    
    .header-actions {
        float: none;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: 20px;
        text-align: center;
    }
    
    .message.user,
    .message.assistant {
        margin-left: 10px;
        margin-right: 10px;
    }
    
    .conversation-sidebar {
        width: 85%;
    }
    
    .conversation-item {
        padding: 12px 15px;
    }
    
    .conversation-actions {
        gap: 6px;
    }
    
    .conversation-edit-btn,
    .conversation-delete-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .account-icon {
        display: none;
    }
    
    .account-text {
        font-size: 0.875rem;
    }
    
    /* Mobile chat improvements */
    .chat-container {
        height: calc(100vh - 150px);
        min-height: 400px;
    }
    
    .chat-messages {
        height: calc(100% - 180px);
        min-height: 250px;
    }
    
    .input-section {
        min-height: 120px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
        padding: 5px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .user-email {
        display: none !important;
    }
    
    #messageInput {
        width: 100%;
        float: none;
        margin-right: 0;
        margin-bottom: 10px;
        height: 60px;
    }
    
    #sendButton {
        width: 100%;
        float: none;
        height: 50px;
    }
    
    .conversation-sidebar {
        width: 100vw;
    }
    
    /* Smaller mobile chat improvements */
    .chat-container {
        height: calc(100vh - 120px);
        min-height: 350px;
    }
    
    .chat-messages {
        height: calc(100% - 200px);
        min-height: 200px;
        padding: 15px;
    }
    
    .input-section {
        min-height: 140px;
        padding: 10px;
    }
    
    .hamburger-menu {
        width: 45px;
        height: 35px;
        padding: 6px;
    }
    
    .sidebar-new-chat {
        padding: 12px 15px;
    }
    
    .new-chat-btn {
        font-size: 0.875rem;
        padding: 10px 15px;
    }
    
    .new-chat-btn::before {
        content: "[+] NEW CONVERSATION";
    }
    
    .conversation-item {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .conversation-meta {
        font-size: 0.8rem;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .conversation-actions {
        gap: 4px;
    }
    
    .conversation-edit-btn,
    .conversation-delete-btn {
        padding: 3px 6px;
        font-size: 0.65rem;
    }
    
    .sidebar-close {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    /* Mobile button group fixes */
    .api-key-actions button,
    .danger-actions button,
    .setting-actions button {
        float: none;
        display: block;
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .input-with-button {
        flex-direction: column;
    }
    
    .input-with-button input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .input-with-button button {
        width: 100%;
    }
}

/* ===== E-INK SPECIFIC OPTIMIZATIONS ===== */
@media (monochrome) {
    * {
        transition: none !important;
        animation: none !important;
    }
    
    input:focus,
    textarea:focus,
    select:focus {
        outline-width: 4px;
    }
    
    .message {
        border-left-width: 6px;
    }
    
    /* Kindle-optimized button padding for better touch targets */
    .conversation-edit-btn,
    .conversation-delete-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        min-height: 32px;
        min-width: 60px;
        margin-right: 12px;
    }
    
    .conversation-delete-btn {
        margin-right: 0;
    }
    
    .conversation-actions {
        margin-top: 4px;
    }
    
    .conversation-item {
        padding: 18px 20px;
        gap: 10px;
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none;
}

.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* ===== AUTHENTICATION FORMS ===== */
.auth-section {
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.auth-step {
    margin-bottom: 20px;
}

.cloud-setup-panel {
    margin-top: 20px;
    padding: 20px;
    border: 2px dashed #000;
    background: #f8f8f8;
}

.cloud-step {
    margin-bottom: 15px;
}

/* ===== FORM GROUPS ===== */
.input-with-button {
    display: flex;
    align-items: stretch;
}

.input-with-button input {
    flex: 1;
    min-width: 0;
    margin-right: 10px;
}

.input-with-button button {
    flex: 0 0 auto;
    font-size: 1rem;
    font-weight: bold;
    white-space: nowrap;
    min-width: fit-content;
    padding: 0 12px;
    border: 2px solid #000;
    box-sizing: border-box;
    text-transform: none;
    letter-spacing: normal;
    font-family: inherit;
    height: 44px;
    line-height: 1.2;
}

.setting-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ccc;
    overflow: hidden; /* clearfix */
}

.setting-actions button {
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
}

.setting-actions button:last-child {
    margin-right: 0;
}

.api-key-actions,
.danger-actions {
    margin-top: 10px;
    overflow: hidden; /* clearfix */
}

.api-key-actions button,
.danger-actions button {
    float: left;
    margin-right: 15px;
    margin-bottom: 10px;
}

.api-key-actions button:last-child,
.danger-actions button:last-child {
    margin-right: 0;
}

/* ===== PAPER-STYLE ANIMATIONS (MINIMAL) ===== */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

/* Remove all color-based hover states and transitions */
* {
    transition: none;
}

/* Ensure high contrast for all text */
body,
input,
textarea,
select,
button {
    color: #000;
    background: #fff;
}

/* ===== SEO LANDING PAGE STYLES ===== */
.landing-page {
    display: block;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Common Section Styles */
.section-intro {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Section */
.hero-section {
    text-align: center;
    border-bottom: 3px solid #000;
    margin-bottom: 60px;
    padding-bottom: 40px;
    padding-top: 40px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 40px;
    padding-bottom: 60px;
    color: #000;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 30px;
    color: #333;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    margin-top: 30px;
}

.cta-button {
    background: #000;
    color: #fff;
    border: 3px solid #000;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin-bottom: 15px;
    display: inline-block;
}

.cta-button:hover {
    background: #fff;
    color: #000;
    border: 3px solid #000;
}

.cta-button.large {
    padding: 20px 40px;
    font-size: 1.2rem;
}

.cta-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

/* Features Section */
.features-section {
    margin-bottom: 50px;
}

.features-section h2 {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.feature-card {
    border: 2px solid #000;
    padding: 20px;
    background: #fff;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
    color: #333;
}

/* How It Works Section */
.how-it-works-section {
    margin-bottom: 50px;
}

.how-it-works-section h2 {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.step {
    text-align: center;
    padding: 20px;
    border: 2px solid #000;
}

.step-number {
    width: 50px;
    height: 50px;
    border: 3px solid #000;
    background: #000;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px auto;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #000;
}

.step p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    margin-bottom: 0;
}

/* Use Cases Section */
.use-cases-section {
    margin-bottom: 50px;
}

.use-cases-section h2 {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.use-cases-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.use-case {
    border-left: 4px solid #000;
    padding: 15px 20px;
    background: #f8f8f8;
}

.use-case h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: #000;
}

.use-case p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    margin-bottom: 0;
}

/* Compatibility Section */
.compatibility-section {
    margin-bottom: 50px;
}

.compatibility-section h2 {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.device-category {
    border: 2px solid #000;
    padding: 20px;
    background: #fff;
}

.device-category h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
    color: #000;
}

.device-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.device-category li {
    padding: 5px 0;
    border-bottom: 1px dotted #ccc;
    font-size: 0.9rem;
    color: #333;
}

.device-category li:last-child {
    border-bottom: none;
}

/* FAQ Section */
.faq-section {
    margin-bottom: 50px;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
}

.faq-list {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    border: 2px solid #000;
    margin-bottom: 15px;
    padding: 20px;
    background: #fff;
}

.faq-item h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: #000;
}

.faq-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    margin-bottom: 0;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 40px 20px;
    border: 3px solid #000;
    background: #f8f8f8;
    margin-bottom: 40px;
}

.cta-section h2 {
    margin-bottom: 15px;
    border-bottom: none;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: #333;
}

.cta-subtext {
    font-size: 0.9rem;
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

/* New Landing Page Sections */

/* Compatibility Proof Section */
.compatibility-proof-section {
    margin-bottom: 50px;
    border: 2px solid #000;
    padding: 30px;
    background: #f9f9f9;
}

.compatibility-proof {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.proof-item {
    background: #fff;
    padding: 20px;
    border: 2px solid #000;
}

.proof-item h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #000;
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
}

.proof-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.proof-item li {
    padding: 5px 0;
    font-size: 0.95rem;
    color: #333;
}

/* Cost Transparency Section */
.cost-transparency-section {
    margin-bottom: 50px;
    background: #f0f8f0;
    padding: 30px;
    border: 2px solid #000;
}

/* Value Justification Section */
.value-justification-section {
    margin-bottom: 50px;
    background: #f8f8f0;
    padding: 30px;
    border: 2px solid #000;
}

.value-comparison {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.value-item {
    background: #fff;
    padding: 20px;
    border: 2px solid #000;
}

.value-item h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: #000;
}

.value-item p {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333;
    margin: 0;
}

.cost-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.cost-item {
    background: #fff;
    padding: 20px;
    border: 2px solid #000;
    text-align: center;
}

.cost-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #000;
    font-weight: bold;
}

.cost-item p {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333;
    margin: 0;
}

/* Setup Simplicity Section */
.setup-simplicity-section {
    margin-bottom: 50px;
}

.simple-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.step-simple {
    border: 2px solid #000;
    padding: 20px;
    background: #fff;
    text-align: center;
}

.setup-guarantee {
    background: #fff8dc;
    padding: 20px;
    border: 2px solid #000;
    text-align: center;
    margin-top: 30px;
}

.setup-guarantee p {
    margin: 0;
    font-size: 1rem;
    color: #333;
}

/* Value Proposition Section */
.value-proposition-section {
    margin-bottom: 50px;
    background: #fff8f8;
    padding: 30px;
    border: 2px solid #000;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.comparison-item {
    background: #fff;
    padding: 25px;
    border: 2px solid #000;
}

.comparison-item h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #000;
    text-align: center;
    border-bottom: 1px solid #000;
    padding-bottom: 10px;
}

.problems-list,
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.problems-list li,
.benefits-list li {
    padding: 8px 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.problems-list li {
    color: #cc0000;
}

.benefits-list li {
    color: #006600;
}

/* Privacy & Performance Section */
.privacy-performance-section {
    margin-bottom: 50px;
}

.assurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.assurance-item {
    background: #f8f8ff;
    padding: 25px;
    border: 2px solid #000;
}

.assurance-item h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #000;
    border-bottom: 1px solid #000;
    padding-bottom: 5px;
}

.assurance-item p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
    margin: 0;
}

/* Non-Technical Section */
.non-technical-section {
    margin-bottom: 50px;
    background: #f0f0f8;
    padding: 30px;
    border: 2px solid #000;
}

.simplicity-proof {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.simple-fact {
    background: #fff;
    padding: 20px;
    border: 2px solid #000;
}

.simple-fact h3 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    color: #000;
}

.simple-fact p {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #333;
    margin: 0;
}

/* Mobile Responsive Adjustments for Landing Page */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

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

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .steps-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .compatibility-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .use-cases-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .cta-button.large {
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    /* New sections mobile adjustments */
    .compatibility-proof,
    .cost-breakdown,
    .value-comparison,
    .simple-steps,
    .comparison-grid,
    .assurance-grid,
    .simplicity-proof {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .compatibility-proof-section,
    .cost-transparency-section,
    .value-justification-section,
    .value-proposition-section,
    .non-technical-section {
        padding: 20px;
    }
}

/* Kindle-safe fallbacks for CSS Grid */
@media (max-width: 480px) {
    .features-grid,
    .steps-container,
    .compatibility-grid,
    .use-cases-list,
    .compatibility-proof,
    .cost-breakdown,
    .value-comparison,
    .simple-steps,
    .comparison-grid,
    .assurance-grid,
    .simplicity-proof {
        display: block;
    }

    .feature-card,
    .step,
    .device-category,
    .use-case,
    .proof-item,
    .cost-item,
    .value-item,
    .step-simple,
    .comparison-item,
    .assurance-item,
    .simple-fact {
        margin-bottom: 20px;
    }

    /* Remove flexbox for step numbers on very old browsers */
    .step-number {
        text-align: center;
        line-height: 44px;
        padding: 0;
    }
}

/* ===== PREMIUM PAYMENT STYLES (Paper Design) ===== */
.premium-section {
    background: #f0f8ff;
    border: 2px dashed #000;
    margin-bottom: 20px;
}

.premium-header {
    border-bottom: 1px solid #000;
    padding: 12px 15px;
    background: transparent;
}

.premium-badge {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    background: none;
    padding: 0;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-badge.premium {
    color: #000;
}

.usage-indicators {
    padding: 15px;
}

.usage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
}

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

.usage-label {
    color: #000;
    font-weight: normal;
}

.usage-value {
    color: #000;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}


/* Premium feature styling */
.premium-feature.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Modal styles for payment and upgrade prompts */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
}

.modal-content {
    background: white;
    color: black;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 3px solid #007bff;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    margin: 0 0 20px 0;
    color: #007bff;
    font-size: 24px;
    font-weight: bold;
}

.modal-message {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #333;
}

.benefits-section {
    text-align: left;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.benefits-title {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 18px;
    text-align: center;
    font-weight: bold;
}

.benefits-list {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.benefits-list li {
    margin-bottom: 8px;
    color: #333;
}

.modal-buttons {
    margin-top: 30px;
}

.modal-btn {
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin: 0 8px;
}

.modal-btn.primary {
    background: #28a745;
    color: white;
}

.modal-btn.primary:hover {
    background: #218838;
}

.modal-btn.secondary {
    background: #6c757d;
    color: white;
}

.modal-btn.secondary:hover {
    background: #5a6268;
}

/* Payment form specific styles */
.price-info {
    font-size: 18px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 30px;
}

.card-element-container {
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

.card-errors {
    color: #dc3545;
    margin-bottom: 20px;
    font-size: 14px;
    min-height: 20px;
}

/* Mobile responsiveness for modals */
@media (max-width: 600px) {
    .modal-content {
        padding: 20px;
        margin: 20px;
        max-width: calc(100% - 40px);
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-btn {
        display: block;
        width: 100%;
        margin: 8px 0;
    }
    
    .premium-info {
        text-align: center;
    }
    
    .upgrade-btn {
        width: 100%;
        margin-top: 10px;
    }
}