html { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
*, *:before, *:after { box-sizing: inherit; }

body {
    margin: 0; padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #080808;
    color: #e5e7eb;
    min-height: 100vh;
    line-height: 1.6;
}

/* Скрываем только верхнюю панель и инфо */
.information-container,
.swagger-ui .topbar { display: none !important; }

/* === ЖЕСТКО ЗАСТАВЛЯЕМ ОТОБРАЖАТЬСЯ СЕКЦИИ ТЭГОВ === */
.swagger-ui .opblock-tag-section {
    display: block !important;
    visibility: visible !important;
}

/* === ЗАГОЛОВКИ РОУТЕРОВ (TAGS) === */
.swagger-ui .opblock-tag {
    color: #ffffff !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #2a2a2a !important;
    padding-bottom: 12px !important;
    margin-top: 32px !important;
    margin-bottom: 16px !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.swagger-ui .opblock-tag:hover {
    background: transparent !important;
    border-bottom-color: #404040 !important;
}

/* Описание роутера рядом с заголовком */
.swagger-ui .opblock-tag small {
    color: #9ca3af !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    margin-left: 16px !important;
}

/* Стрелочка сворачивания/разворачивания группы */
.swagger-ui .opblock-tag svg {
    fill: #9ca3af !important;
    transition: fill 0.25s ease !important;
}

.swagger-ui .opblock-tag:hover svg {
    fill: #ffffff !important;
}

.scheme-container {
    background: #0a0a0a !important;
    border-bottom: 1px solid #1a1a1a !important;
}

.auth-btn-wrapper {
    display: flex !important;
    gap: 5px !important;
}

/* === КНОПКА AUTHORIZE === */
.btn.authorize {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    background: #111111 !important;
    color: #e5e7eb !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    border: 1px solid #2a2a2a !important;
    transition: all 0.25s ease !important;
    cursor: pointer !important;
    min-width: 120px !important;
    height: 40px !important;
    margin: 0 !important;
    line-height: 1 !important;
    text-align: center;
}

.btn.authorize:hover {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #404040 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.btn.authorize svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    display: block !important;
    fill: currentColor !important;
    margin: 0 !important;
}

.btn.authorize span {
    display: inline-block !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.btn.authorize.unlocked { color: #10b981 !important; border-color: #10b981 !important; }
.btn.authorize.unlocked span { color: #10b981 !important; }
.btn.authorize.unlocked svg { fill: #10b981 !important; }
.btn.authorize.unlocked:hover { background: #1a1a1a !important; color: #34d399 !important; border-color: #34d399 !important; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important; }
.btn.authorize.locked svg { fill: #9ca3af !important; }

.custom-topbar { background: #0a0a0a; border-bottom: 1px solid #1a1a1a; padding: 24px 32px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; position: sticky; top: 0; z-index: 1000; backdrop-filter: blur(12px); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5); }
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-logo { height: 40px; filter: brightness(0) invert(1); }
.topbar-title h1 { margin: 0; font-size: 1.6rem; font-weight: 700; color: #ffffff; letter-spacing: -0.5px; }
.topbar-title p { margin: 4px 0 0; font-size: 0.9rem; color: #9ca3af; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.badge { padding: 6px 12px; border-radius: 8px; font-size: 0.75rem; font-weight: 600; background: #111111; color: #d1d5db; border: 1px solid #2a2a2a; text-transform: uppercase; letter-spacing: 0.5px; }
.custom-bot-button { display: inline-flex; align-items: center; gap: 6px; background: #111111; color: #e5e7eb; padding: 8px 16px; border-radius: 10px; font-size: 0.9rem; font-weight: 500; text-decoration: none; border: 1px solid #2a2a2a; transition: all 0.25s ease; }
.custom-bot-button:hover { background: #1a1a1a; color: #ffffff; border-color: #404040; transform: translateY(-1px); }
.custom-bot-button svg { width: 16px; height: 16px; }

#swagger-ui { 
    margin: 0 auto; 
    max-width: 1200px; 
    padding: 32px 20px; /* 32px - это отступ сверху и снизу, 20px - по бокам */
}
#swagger-ui > section { background: rgba(10, 10, 10, 0.8); border-radius: 16px; backdrop-filter: blur(16px); border: 1px solid #1a1a1a; overflow: hidden; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); margin-bottom: 24px; }
#swagger-ui .opblock { background: rgba(20, 20, 20, 0.7); border-radius: 12px; margin: 16px; border: 1px solid #2a2a2a; transition: all 0.25s ease; backdrop-filter: blur(8px); }
#swagger-ui .opblock:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); border-color: #404040; }
.opblock-summary { border-bottom: none !important; outline: none !important; }
.opblock-summary-control { border-bottom: none !important; outline: none !important; }

/* Изолируем селекторы, чтобы они не ломали h3 заголовков (тэгов) */
.opblock-section-header, 
.opblock-description-wrapper h1, 
.opblock-description-wrapper h2, 
.opblock-description-wrapper h3, 
.opblock-description-wrapper h4, 
.opblock-description-wrapper h5, 
.opblock-description-wrapper h6, 
.opblock-description-wrapper p {
    color: #9ca3af !important;
}

.opblock-get    .opblock-summary-method,
.opblock-post   .opblock-summary-method,
.opblock-put    .opblock-summary-method,
.opblock-delete .opblock-summary-method,
.opblock-patch  .opblock-summary-method { background: #111111 !important; color: #ffffff !important; border-left: 5px solid #ffffff !important; font-weight: 700 !important; font-size: 0.8rem !important; text-transform: uppercase; letter-spacing: 1px; padding: 6px 10px !important; border-radius: 6px 0 0 6px; }

#swagger-ui .opblock .opblock-summary-path { color: #ffffff !important; font-family: 'JetBrains Mono', monospace; font-weight: 500; font-size: 0.95rem; }
#swagger-ui .opblock-summary-description { color: #9ca3af !important; font-size: 0.9rem; }
#swagger-ui .response-col_description, .tab, .tabitem { color: #9ca3af !important; }
#swagger-ui .response-control-media-type--accept-controller select { color: #9ca3af !important; }
#swagger-ui select { background-color: black !important; outline: none !important; border: none !important; color: #9ca3af !important; }
#swagger-ui .opblock .opblock-section-header { background-color: #111111 !important; }

.btn, .try-out__btn, .btn-group .btn { display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important; background: #111111 !important; color: #e5e7eb !important; border: 1px solid #2a2a2a !important; border-radius: 10px !important; font-weight: 500 !important; font-size: 0.9rem !important; padding: 10px 16px !important; height: 40px !important; min-width: 100px !important; margin: 0 6px 6px 0 !important; transition: all 0.25s ease !important; cursor: pointer; text-align: center; line-height: 1 !important; }
.btn:hover, .try-out__btn:hover, .btn-group .btn:hover { background: #1a1a1a !important; color: #ffffff !important; border-color: #404040 !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
.btn.execute { background: #ffffff !important; color: #000000 !important; font-weight: 600 !important; text-transform: uppercase; letter-spacing: 0.5px; border: none !important; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important; height: 40px !important; padding: 0 20px !important; min-width: 120px !important; border-radius: 10px !important; gap: 8px !important; }
.btn.execute:hover { background: #f5f5f5 !important; color: #000000 !important; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important; }
.btn.execute::before { content: ""; display: inline-block; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23000'%3E%3Cpath d='M6.3 2.84A1.5 1.5 0 0 0 4 4.11v11.78a1.5 1.5 0 0 0 2.3 1.27l9.34-5.89a1.5 1.5 0 0 0 0-2.54L6.3 2.84Z'/%3E%3C/svg%3E") center/contain no-repeat; flex-shrink: 0; }
.btn.btn-clear, .try-out__btn.cancel { background: #111111 !important; color: #9ca3af !important; border: 1px solid #2a2a2a !important; height: 40px !important; padding: 0 16px !important; min-width: 100px !important; border-radius: 10px !important; gap: 8px !important; }
.btn.btn-clear:hover, .try-out__btn.cancel:hover { background: #1a1a1a !important; color: #e5e7eb !important; border-color: #404040 !important; transform: translateY(-1px); }
.btn.btn-clear::before, .try-out__btn.cancel::before { content: ""; display: inline-block; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239ca3af'%3E%3Cpath fill-rule='evenodd' d='M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat; flex-shrink: 0; }
.btn-group { display: flex !important; gap: 12px !important; margin: 16px 0 !important; flex-wrap: nowrap !important; align-items: center; justify-content: flex-start; }
.parameters, .responses-inner { background: rgba(20, 20, 20, 0.7) !important; border-radius: 10px !important; margin: 12px 0 !important; padding: 14px !important; border: 1px solid #2a2a2a !important; }
.parameter__name { color: #ffffff !important; font-weight: 600 !important; }
.parameter__type { color: #9ca3af !important; font-family: 'JetBrains Mono', monospace !important; font-size: 0.8rem !important; }
.parameter__name.required:after { content: " *"; color: #ffffff !important; font-weight: bold; }
.microlight { background: #0a0a0a !important; border-radius: 8px !important; padding: 14px !important; border-left: 3px solid #ffffff !important; color: #e5e7eb !important; font-size: 0.85rem !important; }
.response-col_status { color: #ffffff !important; font-weight: 600 !important; }
.auth-container .btn.authorize { background: #111111 !important; border: 1px solid #2a2a2a !important; color: #e5e7eb !important; padding: 8px 16px !important; font-size: 0.85rem !important; }
.auth-container .btn.authorize:hover { background: #1a1a1a !important; color: #ffffff !important; }
.modal-ux { background: black !important; border: solid 1px rgb(50, 50, 50) !important; color: #ffffff !important; }
.swagger-ui label { color: #ffffff !important; }
#auth-bearer-value { background-color: rgb(25, 25, 25) !important; color: white !important; border: none !important; outline: none !important; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #404040; }
@media (max-width: 768px) { .custom-topbar { padding: 16px 20px; flex-direction: column; text-align: center; } .topbar-left, .topbar-right { justify-content: center; } #swagger-ui { padding: 0 12px 20px; } .btn-group { justify-content: center; } }
.swagger-ui * { transition: all 0.2s ease-in-out; }