body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
}

.login-container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-top: 0;
}

.status-container {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
}

.status-available {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.status-unavailable {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.status-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input:focus {
    border-color: #007bff;
    outline: none;
}

button {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover:not(:disabled) {
    background-color: #0056b3;
}

button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Стили для ошибок */
.server-error {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 14px;
}

.client-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-input {
    border-color: #dc3545;
}

.warning {
    color: #856404;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #fff3cd;
    border-radius: 4px;
}

.demo-credentials {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
}

.retry-button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

.retry-button:hover {
    background-color: #218838;
}

.refresh-button {
    display: inline-block;
    padding: 5px 10px;
    background-color: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

.refresh-button:hover {
    background-color: #5a6268;
}

.api-details {
    margin-top: 10px;
    font-size: 12px;
    color: #666;
    text-align: left;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.toggle-details {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    margin-top: 5px;
}

.toggle-details:hover {
    text-decoration: underline;
}

.loading {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для панели отладки */
.debug-panel {
    position: fixed;
    bottom: 0;
    left: 280px;
    right: 0;
    background: #1a1a1a;
    color: #fff;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    z-index: 9999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
    max-height: 300px;
    display: flex;
    flex-direction: column;
}

.debug-header {
    background: #333;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.debug-title {
    font-weight: bold;
    color: #4CAF50;
}

.debug-controls {
    display: flex;
    gap: 10px;
}

.debug-btn {
    background: #555;
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.debug-btn:hover {
    background: #666;
}

.debug-btn.clear {
    background: #d32f2f;
}

.debug-btn.clear:hover {
    background: #f44336;
}

.debug-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #222;
    display: none;
}

.debug-content.expanded {
    display: block;
}

.debug-entry {
    border-bottom: 1px solid #444;
    padding: 5px 0;
    font-size: 11px;
}

.debug-time {
    color: #FF9800;
    font-weight: bold;
    margin-right: 10px;
}

.debug-message {
    color: #4CAF50;
    font-weight: bold;
}

.debug-data {
    margin-top: 5px;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 3px;
    border-left: 3px solid #2196F3;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 150px;
    overflow-y: auto;
}

.debug-data pre {
    margin: 0;
    font-size: 10px;
    line-height: 1.3;
}

.debug-data-toggle {
    color: #2196F3;
    cursor: pointer;
    font-size: 10px;
    margin-left: 10px;
    user-select: none;
}

.debug-token-info {
    background: #333;
    padding: 5px 10px;
    border-radius: 3px;
    margin: 5px 0;
    font-size: 10px;
}

.debug-warning {
    color: #FF9800;
}

.debug-error {
    color: #f44336;
}

.debug-success {
    color: #4CAF50;
}

.debug-info {
    color: #2196F3;
}

.debug-section {
    margin: 10px 0;
    padding: 8px;
    background: #2a2a2a;
    border-radius: 3px;
}

.debug-section-title {
    color: #9C27B0;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 11px;
}

/* Стили для кнопки "Показать переменные" */
.show-vars-btn {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.show-vars-btn:hover {
    background: #444;
}