/* MyConnectAI v3 - Kompletní styly */
/* Správná verze podle melioro.online */

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

/* === COLOR SCHEMES === */
:root {
    /* Claude (Default) */
    --primary-color: #C96442;
    --primary-hover: #B45309;
    --secondary-color: #78716C;
    --success-color: #16A34A;
    --warning-color: #EAB308;
    --error-color: #DC2626;
    --background: #FAF9F5;
    --surface: #F0EEE6;
    --surface-hover: #E8E5DD;
    --border: #E2DFD7;
    --text-primary: #2D2A26;
    --text-secondary: #6B6B6B;
    --text-muted: #9CA3AF;
    --shadow-sm: 0 1px 2px 0 rgb(45 42 38 / 0.05);
    --shadow: 0 1px 3px 0 rgb(45 42 38 / 0.1), 0 1px 2px -1px rgb(45 42 38 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(45 42 38 / 0.1), 0 4px 6px -4px rgb(45 42 38 / 0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Google theme */
.theme-google {
    --primary-color: #1a73e8;
    --primary-hover: #1557b0;
    --border: #dadce0;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-muted: #80868b;
    --success-color: #137333;
    --warning-color: #f29900;
    --error-color: #d93025;
    --background: #ffffff;
    --surface: #f8f9fa;
    --surface-hover: #f1f3f4;
}

/* Replit theme */
.theme-replit {
    --background: #0e1525;
    --surface: #1c2333;
    --surface-hover: #2d3748;
    --border: #3a4553;
    --text-primary: #f7fafc;
    --text-secondary: #a0aec0;
    --text-muted: #718096;
    --primary-color: #f56565;
    --primary-hover: #e53e3e;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --error-color: #f56565;
}

/* Carrd theme */
.theme-carrd {
    --primary-color: #00d9d9;
    --primary-hover: #00ffff;
    --secondary-color: #ff0080;
    --success-color: #00d084;
    --warning-color: #ffb900;
    --error-color: #ff0080;
    --background: #0d0f11;
    --surface: #1a1d21;
    --surface-hover: #242830;
    --border: #2a2d35;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --shadow-sm: 0 2px 8px rgba(0, 217, 217, 0.1);
    --shadow: 0 4px 16px rgba(0, 217, 217, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 217, 217, 0.3);
    --radius: 0.75rem;
    --radius-lg: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
    background: var(--background);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.chat-container {
    width: 100%;
    max-width: 900px;
    height: 95vh;
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
}

/* === HEADER === */
.chat-header {
    background: var(--surface);
    color: var(--text-primary);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    min-height: 80px;
    transition: all 0.2s ease;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chat-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

.header-logo-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-logo-link:hover {
    color: var(--primary-color);
}

.header-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.header-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* === ACTION BUTTONS === */
/* Základní styly pro action-button (stejné jako původní index-button) */
.action-button {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.action-button:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.action-button:active {
    transform: translateY(0);
}

/* Carrd theme - speciální styly pro action-button (převzato z index-button) */
.theme-carrd .action-button {
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 2rem;
}

.theme-carrd .action-button:hover {
    background: var(--primary-color);
    color: var(--background);
    box-shadow: 0 0 20px rgba(0, 217, 217, 0.5);
    transform: translateY(-2px);
}

/* === DROPDOWN MENU === */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: var(--surface);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-top: 0.5rem;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: var(--text-primary);
    padding: 0.875rem 1.25rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: var(--surface-hover);
}

/* === MODAL === */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

.theme-replit .modal,
.theme-carrd .modal {
    background-color: rgba(0, 0, 0, 0.8);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: var(--surface);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.close-button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.close-button:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

/* === SETTINGS TABS === */
.settings-tabs {
    display: flex;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    gap: 0.5rem;
}

.settings-tab {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.settings-tab:hover {
    color: var(--text-primary);
}

.settings-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    background: var(--surface);
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-footer-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cancel-button {
    padding: 0.875rem 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cancel-button:hover {
    background: var(--surface-hover);
    border-color: var(--text-secondary);
}

/* === MODE SELECTOR (Radio buttons) === */
.mode-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.mode-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-option:hover {
    border-color: var(--primary-color);
    background: var(--surface);
}

.mode-option input[type="radio"] {
    margin-top: 0.125rem;
    cursor: pointer;
}

.mode-option input[type="radio"]:checked + .mode-label {
    color: var(--primary-color);
}

.mode-label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mode-label strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.mode-label small {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* === SETTINGS SECTIONS === */
.settings-section {
    margin-bottom: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

/* OPRAVA: Odstranit spodní mezeru u poslední sekce v modal-body */
.modal-body .settings-section:last-child,
.modal-body > .settings-section:last-of-type,
#providers-settings + .settings-section,
.tab-content .settings-section:last-child {
    margin-bottom: 0;
}

.settings-section h3 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Provider sections - už mají vlastní styl, jen upravíme */
.provider-section {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

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

.provider-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

/* Model specific settings */
.model-settings-group {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--background);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.model-settings-group h4 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.setting-item {
    margin-bottom: 1rem;
}

.setting-item:last-child {
    margin-bottom: 0;
}

.setting-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.setting-item small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Model Select */
.settings-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.settings-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.1);
}

.theme-carrd .settings-select:focus {
    box-shadow: 0 0 0 2px rgba(0, 217, 217, 0.2);
}

.settings-select optgroup {
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface);
}

.settings-select option {
    font-weight: 400;
    padding: 0.5rem;
}

.settings-select option:disabled {
    color: var(--text-muted);
    font-style: italic;
}

/* Theme Selector */
.theme-selector {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.theme-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.theme-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
}

.theme-btn.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.15);
}

.theme-btn.theme-claude {
    background: linear-gradient(135deg, #FAF9F5 0%, #F0EEE6 100%);
}

.theme-btn.theme-google {
    background: linear-gradient(135deg, #ffffff 0%, #1a73e8 100%);
}

.theme-btn.theme-replit {
    background: linear-gradient(135deg, #0e1525 0%, #f56565 100%);
}

.theme-btn.theme-carrd {
    background: linear-gradient(135deg, #00d9d9 0%, #0d0f11 100%);
}

/* API Key Inputs */
.api-key-group {
    margin-bottom: 1.5rem;
    display: block;
}

.api-key-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.api-key-input,
.settings-input {
    flex: 1;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.api-key-input:focus,
.settings-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.1);
}

.theme-carrd .api-key-input:focus,
.theme-carrd .settings-input:focus {
    box-shadow: 0 0 0 2px rgba(0, 217, 217, 0.2);
}

.toggle-btn,
.test-btn {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toggle-btn:hover,
.test-btn:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
}

.api-key-group small {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.api-key-group small a {
    color: var(--primary-color);
    text-decoration: none;
}

.api-key-group small a:hover {
    text-decoration: underline;
}

/* Export/Import Buttons */
.export-import-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.action-btn {
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Save Button */
.save-button {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius);
    background: var(--primary-color);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.save-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.save-button.has-changes {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(201, 100, 66, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(201, 100, 66, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 100, 66, 0); }
}

/* Settings Status */
.settings-status {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    display: none;
}

.settings-status.success {
    display: block;
    background: rgba(22, 163, 74, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.settings-status.error {
    display: block;
    background: rgba(220, 38, 38, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* === CHAT MESSAGES === */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    background: var(--background);
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    max-width: 85%;
    word-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 0.925rem;
    box-shadow: var(--shadow-sm);
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-message {
    background: var(--primary-color);
    color: white;
    margin-left: auto;
    margin-right: 0;
    border-bottom-right-radius: 0.25rem;
}

.assistant-message {
    background: var(--surface);
    color: var(--text-primary);
    margin-right: auto;
    margin-left: 0;
    border-bottom-left-radius: 0.25rem;
    border: 1px solid var(--border);
}

.system-message {
    background: rgba(201, 100, 66, 0.1);
    color: var(--primary-color);
    margin: 1rem auto;
    text-align: center;
    width: fit-content;
    max-width: 95%;
    font-style: italic;
    border: 1px solid rgba(201, 100, 66, 0.2);
}

.theme-carrd .system-message {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-style: normal;
}

.error-message {
    background: rgba(220, 38, 38, 0.1);
    color: var(--error-color);
    margin: 1rem auto;
    text-align: center;
    width: fit-content;
    max-width: 95%;
    font-weight: 500;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

/* === WELCOME SCREEN === */
.welcome-container {
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.welcome-content {
    max-width: 600px;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.example-queries {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    margin: 0;
}

.example-query {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.example-query::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.example-query:hover::before {
    transform: scaleX(1);
}

.example-query:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* === CHAT INPUT === */
.chat-input-area {
    display: flex;
    padding: 1.5rem 2rem;
    background: var(--background);
    border-top: 1px solid var(--border);
    gap: 1rem;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-size: 0.925rem;
    resize: none;
    outline: none;
    background: var(--background);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, height 0.1s ease;
    font-family: inherit;
    line-height: 1.6;
    min-height: 2.75rem;
    max-height: 200px;
    color: var(--text-primary);
    overflow-y: hidden;
    display: block;
}

.chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.1);
}

.theme-carrd .chat-input:focus {
    box-shadow: 0 0 0 2px rgba(0, 217, 217, 0.2);
}

.chat-input::placeholder {
    color: var(--text-muted);
}

.send-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.send-button:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.send-button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* === APP FOOTER === */
.app-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
}

.footer-text {
    color: var(--text-secondary);
}

.footer-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.footer-link {
    color: inherit;
    text-decoration: none;
}

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

.footer-link strong {
    color: var(--primary-color);
}

/* === ABOUT SECTION === */
.about-content {
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-content h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.about-content p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.about-content ul {
    list-style: none;
    padding: 0;
}

.about-content li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    padding-left: 1.5rem;
    position: relative;
}

.about-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border-radius: var(--radius);
    margin: 1rem 0;
    border: 1px solid var(--border);
}

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

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

/* === CARRD THEME SPECIAL STYLES === */
.theme-carrd body {
    background: #000000;
}

.theme-carrd .chat-container {
    box-shadow: 0 0 40px rgba(0, 217, 217, 0.1);
}

.theme-carrd .chat-header h1 {
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-carrd .theme-btn {
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    opacity: 0.7;
}

.theme-carrd .theme-btn:hover {
    transform: scale(1.1);
    border-color: var(--primary-color);
    opacity: 1;
}

.theme-carrd .theme-btn.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 217, 217, 0.5);
    opacity: 1;
}

.theme-carrd .welcome-title {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.theme-carrd .example-query {
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.3s ease;
}

.theme-carrd .example-query::before {
    display: none;
}

.theme-carrd .example-query:hover {
    background: var(--surface-hover);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 217, 217, 0.2);
}

.theme-carrd .user-message {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--background);
    border: none;
}

.theme-carrd .chat-input-area {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.theme-carrd .chat-input {
    border: 1px solid var(--border);
    background: var(--background);
}

.theme-carrd .chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 217, 217, 0.2);
    background: var(--surface);
}

.theme-carrd .send-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: var(--background);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 217, 217, 0.3);
}

.theme-carrd .send-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 217, 217, 0.5);
}

.theme-carrd .send-button:disabled {
    background: var(--border);
    color: var(--text-muted);
    box-shadow: none;
}

.theme-carrd .footer-link strong {
    color: var(--primary-color);
}

.theme-carrd .footer-link:hover strong {
    color: var(--primary-hover);
    text-shadow: 0 0 10px rgba(0, 217, 217, 0.5);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .chat-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
        max-width: none;
    }
    
    .chat-header {
        padding: 1rem 1.5rem;
        min-height: 70px;
    }
    
    .chat-header h1 {
        font-size: 1.25rem;
    }
    
    .header-subtitle {
        font-size: 0.8rem;
    }
    
    .action-button {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
    }
    
    .chat-messages {
        padding: 1rem;
    }
    
    .chat-input-area {
        padding: 1rem 1.5rem;
    }
    
    .example-queries {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .example-query {
        padding: 0.875rem 1rem;
        font-size: 0.8rem;
    }
    
    .message {
        max-width: 90%;
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .export-import-buttons {
        grid-template-columns: 1fr;
    }
    
    .app-footer {
        padding: 0.75rem 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
    
    .modal-footer-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .cancel-button,
    .save-button {
        flex: 1;
    }
    
    /* Tabs na mobilu */
    .settings-tabs {
        padding: 0 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .settings-tab {
        padding: 0.875rem 1.25rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header-subtitle {
        display: none;
    }
    
    .header-buttons {
        gap: 0.25rem;
    }
    
    .footer-content {
        gap: 0.25rem;
    }
}

/* === SECURITY INFO === */
.security-info {
    background: rgba(26, 115, 232, 0.08);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.theme-replit .security-info {
    background: rgba(245, 101, 101, 0.1);
    border-color: rgba(245, 101, 101, 0.3);
}

.theme-carrd .security-info {
    background: rgba(0, 217, 217, 0.1);
    border-color: rgba(0, 217, 217, 0.3);
}

.security-text {
    color: var(--text-secondary);
    line-height: 1.5;
}

.security-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
}

.security-link:hover {
    text-decoration: underline;
}

/* Security Modal */
.security-modal-content {
    max-width: 700px;
}

.security-feature {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.security-feature:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.security-feature h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

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

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === SCROLLBAR STYLING === */
/* Webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--background);
}

/* === LOADING ANIMATION === */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}
/* Přidat tyto styly do style.css na vhodné místo (např. za existující .settings-input styly) */

/* Settings textarea pro editaci příkladů dotazů */
.settings-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.settings-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(201, 100, 66, 0.1);
}

/* Pro tmavá témata */
.theme-replit .settings-textarea,
.theme-carrd .settings-textarea {
    background: var(--background);
    color: var(--text-primary);
}

.theme-carrd .settings-textarea:focus {
    box-shadow: 0 0 0 2px rgba(0, 217, 217, 0.2);
}

/* Checkbox styling */
.setting-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

/* Responsive úpravy */
@media (max-width: 768px) {
    .settings-textarea {
        min-height: 80px;
        font-size: 0.8rem;
    }
}
/* === PŘIDAT NA KONEC style.css === */

/* === MODEL STATUS BADGE === */
.model-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-right: 0.5rem;
    position: relative;
    transition: all 0.2s ease;
}

.status-model-name {
    font-weight: 500;
}

.status-indicators {
    display: flex;
    gap: 0.25rem;
    font-size: 1rem;
}

/* Tooltip při hoveru */
.model-status-badge[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: var(--shadow);
    pointer-events: none;
}

/* Animace při změně modelu */
@keyframes statusUpdate {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.model-status-badge.updating {
    animation: statusUpdate 0.3s ease;
}

/* === VYLEPŠENÉ NÁPOVĚDY V NASTAVENÍ === */
.settings-section small {
    display: block;
    color: var(--text-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.settings-section small strong {
    color: var(--text-secondary);
    font-weight: 600;
}

.settings-section small code {
    background: var(--surface);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.75rem;
    color: var(--primary-color);
    border: 1px solid var(--border);
}

/* Speciální styl pro tipy */
.setting-item small br + strong {
    display: inline-block;
    margin-top: 0.5rem;
}

/* Pro API key formáty */
.api-key-group small code {
    white-space: nowrap;
}

/* Tip ikony */
.tip-icon {
    display: inline-block;
    margin-right: 0.25rem;
}

/* Varování styl */
.warning-tip {
    background: rgba(var(--warning-color), 0.1);
    border-left: 3px solid var(--warning-color);
    padding: 0.5rem 0.75rem;
    margin-top: 0.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}

/* === SPOTIFY BLACK THEME === */
.theme-spotify {
    /* Primární barvy */
    --primary-color: #1db954;
    --primary-hover: #1ed760;
    --secondary-color: #1db954;
    --success-color: #1db954;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Pozadí a povrchy */
    --background: #000000;
    --surface: #121212;
    --surface-hover: #1a1a1a;
    --border: #282828;
    
    /* Texty */
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #7a7a7a;
    
    /* Stíny - zachovat stejnou strukturu jako ostatní témata */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    
    /* Zachovat stejné radiusy jako ostatní témata */
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

/* === SOLARIZED LIGHT THEME === */
.theme-solarized {
    /* Primární barvy */
    --primary-color: #268bd2;
    --primary-hover: #2176b0;
    --secondary-color: #859900;
    --success-color: #859900;
    --warning-color: #b58900;
    --error-color: #dc322f;
    
    /* Pozadí a povrchy */
    --background: #fdf6e3;
    --surface: #eee8d5;
    --surface-hover: #e3dcc9;
    --border: #93a1a1;
    
    /* Texty */
    --text-primary: #657b83;
    --text-secondary: #586e75;
    --text-muted: #93a1a1;
    
    /* Stíny - jemnější pro světlé téma */
    --shadow-sm: 0 1px 2px 0 rgb(101 123 131 / 0.05);
    --shadow: 0 1px 3px 0 rgb(101 123 131 / 0.1), 0 1px 2px -1px rgb(101 123 131 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(101 123 131 / 0.1), 0 4px 6px -4px rgb(101 123 131 / 0.1);
    
    /* Zachovat stejné radiusy jako ostatní témata */
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Theme buttons pro nová témata */
.theme-btn.theme-spotify {
    background: linear-gradient(135deg, #000000 0%, #1db954 100%);
}

.theme-btn.theme-solarized {
    background: linear-gradient(135deg, #fdf6e3 0%, #268bd2 100%);
}

/* === RESPONZIVNÍ ÚPRAVY === */
@media (max-width: 768px) {
    .model-status-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
        margin-right: 0.25rem;
    }
    
    .status-indicators {
        font-size: 0.9rem;
    }
    
    /* Skrýt tooltip na mobilech */
    .model-status-badge[data-tooltip]:hover::after {
        display: none;
    }
    
    /* Upravit layout hlavičky */
    .header-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .model-status-badge {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    /* Na velmi malých obrazovkách zobrazit jen ikony */
    .status-model-name {
        display: none;
    }
    
    .model-status-badge {
        padding: 0.5rem;
        width: auto;
        margin-bottom: 0;
    }
}
