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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #2c3e50;
    font-size: 2.5em;
    margin-bottom: 10px;
}

h2 {
    color: #34495e;
    font-size: 1.3em;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 8px;
}

/* Двухколоночный макет */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.left-column, .right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.input-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    height: 42px;
    line-height: 1.5;
    box-sizing: border-box;
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
    resize: vertical;
    min-height: 80px;
    height: auto;
}

.buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.api-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.api-btn:hover {
    background: linear-gradient(135deg, #2980b9, #21618c);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.api-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.api-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.full-width {
    width: 100%;
    margin-top: 10px;
}

.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 50px;
    width: 100%;
    box-sizing: border-box;
    height: 42px;
    line-height: 1.5;
}

.toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    user-select: none;
}

.toggle-btn:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.toggle-btn:active {
    background-color: rgba(52, 152, 219, 0.2);
}

.response-container {
    height: 100%;
    min-height: 900px;
}

.response-content {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.4;
    height: 100%;
    min-height: 900px;
    max-height: 1000px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 2px solid #34495e;
}

.response-content:empty::before {
    content: "Ответы методов API будут отображаться здесь...";
    color: #95a5a6;
    font-style: italic;
}

.qr-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.qr-container {
    margin-top: 15px;
}

.qr-image {
    margin: 15px auto;
    max-width: 250px;
    min-height: 200px;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
}

.qr-image img {
    max-width: 100%;
    border-radius: 8px;
}

.qr-image:empty::before {
    content: "QR-код появится здесь";
    color: #95a5a6;
    font-style: italic;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error {
    background-color: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid #c0392b;
}

.success {
    background-color: #27ae60;
    color: white;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    border-left: 4px solid #229954;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .response-container {
        min-height: 600px;
    }
    
    .response-content {
        min-height: 600px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .buttons-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2em;
    }
    
    section {
        padding: 15px;
    }
}
