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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: #2c3e50;
}

header {
    background: #e74c3c;
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

header a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.9;
}

header a:hover { opacity: 1; text-decoration: underline; }
header h1 { font-size: 20px; font-weight: 600; }

.container {
    max-width: 800px;
    margin: 32px auto;
    padding: 0 24px;
}

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 24px;
    margin-bottom: 24px;
}

.card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }

.form-group label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #34495e;
}

.form-group label .hint {
    font-weight: 400;
    color: #95a5a6;
    font-size: 12px;
}

.form-group input,
.form-group select {
    padding: 8px 12px;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231,76,60,0.12);
}

.checkbox-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.checkbox-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #e74c3c;
}

.btn-send {
    padding: 10px 32px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}

.btn-send:hover { background: #c0392b; }
.btn-send:disabled { opacity: 0.6; cursor: not-allowed; }

.token-section {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.token-section .form-group { flex: 1; }

.response-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    display: none;
}

.response-card.visible { display: block; }

.response-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.response-header .status { font-weight: 700; font-size: 14px; }
.response-header .status.ok { color: #27ae60; }
.response-header .status.error { color: #e74c3c; }
.response-header .time { font-size: 12px; color: #95a5a6; }

.response-body {
    padding: 16px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 400px;
    overflow-y: auto;
    background: #1e1e2e;
    color: #cdd6f4;
    position: relative;
}

.response-body-wrapper {
    position: relative;
}

.btn-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    background: rgba(255,255,255,0.15);
    color: #cdd6f4;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    z-index: 1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-copy:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.btn-copy.copied {
    background: #27ae60;
    color: #fff;
    border-color: #27ae60;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #95a5a6;
}

.loading.active { display: block; }

.hidden { display: none !important; }

.divider-or {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider-or::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #dfe6e9;
}

.divider-or span {
    position: relative;
    background: #fff;
    padding: 0 16px;
    color: #95a5a6;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-subtitle {
    font-size: 14px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 12px;
}

.btn-auth {
    padding: 8px 24px;
    background: #34495e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-auth:hover { background: #2c3e50; }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-status {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.auth-status.success {
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #a9dfbf;
}

.auth-status.error {
    background: #fde8e8;
    color: #e74c3c;
    border: 1px solid #f5b7b1;
}