* {
    box-sizing: border-box;
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 40px;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    flex: 1;
}
.content {
    display: flex;
    gap: 20px;
    padding: 30px;
    flex-wrap: wrap;
}
.form-panel {
    flex: 2;
    min-width: 300px;
}
.history-panel {
    flex: 1;
    min-width: 250px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #dee2e6;
}
.history-panel h3 {
    margin-top: 0;
    font-size: 1rem;
    color: #495057;
    border-bottom: 1px solid #ced4da;
    padding-bottom: 8px;
}
.previous-query {
    background: white;
    border-radius: 6px;
    padding: 12px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    user-select: text;
    -webkit-user-select: text;
}
textarea {
    width: 100%;
    height: 350px;
    padding: 12px;
    font-size: 14px;
    font-family: monospace;
    border: 1px solid #ccc;
    border-radius: 8px;
    resize: vertical;
}
button {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 15px;
    transition: background 0.2s;
}
button:hover {
    background: #0056b3;
}
.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 6px;
    display: none;
}
.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.command-output {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 12px;
    margin-top: 15px;
    font-family: monospace;
    font-size: 13px;
    white-space: pre-wrap;
    max-height: 200px;
    overflow: auto;
    display: none;
}
footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    font-size: 13px;
    color: #6c757d;
    border-top: 1px solid #dee2e6;
    background: white;
    border-radius: 8px;
}
footer a {
    color: #007bff;
    text-decoration: none;
}
@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }
    body {
        padding: 20px;
    }
}
/* Индикатор загрузки */
.loading-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}
button:disabled:hover {
    background-color: #6c757d;
}
.message a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}
.message a:hover {
    text-decoration: underline;
}
.previous-query a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 8px;
}
.previous-query a:hover {
    text-decoration: underline;
}
.previous-query a {
    margin-right: 10px;
    margin-bottom: 5px;
}