/* styles.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    height: 90vh;
    background: #14141e;
    border-radius: 16px;
    border: 1px solid #2a2a3a;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

header {
    padding: 16px 24px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-bottom: 1px solid #2a2a3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

header h1 {
    font-size: 20px;
    background: linear-gradient(90deg, #6c5ce7, #00b894);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #8888aa;
}

.user-info button {
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    color: #a8a8d8;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.user-info button:hover {
    background: rgba(108, 92, 231, 0.25);
    border-color: #6c5ce7;
}

/* Nastavení */
.settings-panel {
    background: #1a1a2e;
    padding: 20px 24px;
    border-bottom: 1px solid #2a2a3a;
    flex-shrink: 0;
    transition: all 0.3s;
}

.settings-panel.hidden {
    display: none;
}

.settings-panel h3 {
    font-size: 14px;
    color: #a8a8d8;
    margin-bottom: 12px;
}

.settings-panel .form-group {
    margin-bottom: 12px;
}

.settings-panel label {
    display: block;
    font-size: 13px;
    color: #8888aa;
    margin-bottom: 4px;
}

.settings-panel select,
.settings-panel input[type="range"] {
    width: 100%;
    padding: 8px 12px;
    background: #0a0a0f;
    border: 1px solid #2a2a3a;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
}

.settings-panel input[type="checkbox"] {
    margin-right: 8px;
}

.btn-save {
    background: #6c5ce7;
    border: none;
    color: white;
    padding: 8px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-save:hover {
    background: #7c6cf0;
    transform: scale(1.02);
}

/* Chat */
.chat-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    background: #0f0f1a;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    text-align: center;
    color: #555577;
    padding: 40px 20px;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state small {
    font-size: 13px;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #6c5ce7, #4a3f8a);
    border-bottom-right-radius: 4px;
}

.message.assistant {
    align-self: flex-start;
    background: #1a1a2e;
    border: 1px solid #2a2a3a;
    border-bottom-left-radius: 4px;
}

.message-content {
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
}

.message-content pre {
    background: #0a0a0f;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
    font-size: 13px;
}

.message-content code {
    background: rgba(108, 92, 231, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.message-meta {
    font-size: 11px;
    color: #555577;
    margin-top: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Vstup */
.chat-input {
    padding: 16px 24px;
    background: #14141e;
    border-top: 1px solid #2a2a3a;
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.chat-input textarea {
    flex: 1;
    padding: 12px 16px;
    background: #0a0a0f;
    border: 1px solid #2a2a3a;
    border-radius: 12px;
    color: #e0e0e0;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

.chat-input textarea:focus {
    outline: none;
    border-color: #6c5ce7;
}

.chat-input button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #6c5ce7, #4a3f8a);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chat-input button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.3);
}

.chat-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status bar */
.status-bar {
    padding: 8px 24px;
    background: #0a0a0f;
    border-top: 1px solid #1a1a2e;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #555577;
    flex-shrink: 0;
}

#statusText {
    color: #8888aa;
}

#modelDisplay {
    color: #6c5ce7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: #2a2a3a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a5a;
}

/* Responzivita */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }
    
    .container {
        height: 95vh;
        border-radius: 12px;
    }
    
    header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    header h1 {
        font-size: 16px;
    }
    
    .user-info {
        font-size: 11px;
        flex-wrap: wrap;
    }
    
    .chat-container {
        padding: 12px 16px;
    }
    
    .message {
        max-width: 95%;
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .chat-input {
        padding: 12px 16px;
        flex-direction: column;
    }
    
    .chat-input textarea {
        font-size: 16px;
        min-height: 50px;
    }
    
    .chat-input button {
        padding: 10px;
        font-size: 14px;
    }
}