* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background: linear-gradient(135deg, #1e1e2f, #2a2a3d);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-wrapper {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #252540;
    padding: 20px;
    transition: transform 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-header h2 {
    color: #00d4ff;
    font-size: 1.5rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-toggle:hover {
    color: #00d4ff;
}

.sidebar-nav .nav-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: #33334d;
    border: none;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.sidebar-nav .nav-btn:hover {
    background: #00d4ff;
    color: #1e1e2f;
}

.sidebar-nav .nav-btn i {
    margin-right: 10px;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section h3 {
    color: #00d4ff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.sidebar-section select {
    width: 100%;
    padding: 10px;
    background: #33334d;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.settings label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.settings input[type="checkbox"] {
    margin-right: 10px;
}

.range-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-container input[type="range"] {
    flex: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

.main-content.full-width {
    margin-left: 0;
}

.main-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.menu-btn {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px;
    display: none;
}

.main-header h1 {
    color: #00d4ff;
    font-size: 1.8rem;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.card {
    background: #2a2a3d;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.card h2 {
    color: #00d4ff;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    background: #33334d;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-group input[type="file"] {
    padding: 5px 0;
}

.avatar-preview {
    display: none;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-top: 10px;
    object-fit: cover;
}

.button-group {
    display: flex;
    gap: 10px;
}

/* Chat Section */
.chat-container {
    background: #2a2a3d;
    border-radius: 12px;
    padding: 20px;
    height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.chat-header h2 {
    color: #00d4ff;
}

.chat-header select {
    padding: 8px;
    background: #33334d;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #33334d;
    border-radius: 8px;
    margin-bottom: 15px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message .message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.chat-message.user .message-content {
    background: #00d4ff;
    color: #1e1e2f;
}

.chat-message.assistant .message-content {
    background: #444;
    color: #e0e0e0;
}

.chat-message img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.chat-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.chat-input textarea {
    flex: 1;
    padding: 10px;
    background: #33334d;
    border: 1px solid #444;
    border-radius: 6px;
    color: #e0e0e0;
    resize: none;
}

.chat-actions {
    display: flex;
    gap: 10px;
}

.ai-response {
    padding: 15px;
    background: #33334d;
    border-radius: 8px;
    font-size: 0.95rem;
}

.ai-response.loading::before {
    content: 'Загрузка...';
    display: block;
    text-align: center;
    color: #00d4ff;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s, transform 0.2s;
}

.btn i {
    margin-right: 5px;
}

.btn.primary {
    background: #00d4ff;
    color: #1e1e2f;
}

.btn.secondary {
    background: #666;
    color: #e0e0e0;
}

.btn.danger {
    background: #ff4444;
    color: #fff;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn.primary:hover {
    background: #00b8d4;
}

.btn.secondary:hover {
    background: #888;
}

.btn.danger:hover {
    background: #cc3333;
}

/* Footer */
.footer {
    text-align: center;
    padding: 10px;
    background: #252540;
    color: #777;
    font-size: 0.85rem;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-btn {
        display: block;
    }

    .chat-container {
        height: calc(100vh - 100px);
    }
}