/* frontend/styles.css */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #1e293b, #020617);
    color: #f9fafb;
    min-height: 100vh;
}

.page {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 16px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #38bdf8;
}

.header-right {
    font-size: 14px;
    color: #9ca3af;
}

.main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.hidden {
    display: none;
}

h1, h2 {
    margin-top: 0;
    color: #e5e7eb;
}

label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    color: #9ca3af;
}

input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    margin-top: 4px;
    border-radius: 8px;
    border: 1px solid #4b5563;
    background: rgba(15, 23, 42, 0.8);
    color: #e5e7eb;
    outline: none;
    font-size: 14px;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #38bdf8, #22c55e);
    color: #020617;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.35);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 45px rgba(56, 189, 248, 0.5);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.file-label input[type="file"] {
    margin-top: 8px;
}

.status {
    font-size: 14px;
    color: #a5b4fc;
    margin-top: 8px;
}

.error-message {
    margin-top: 8px;
    color: #f97373;
    font-size: 14px;
}

.result-block {
    margin-top: 16px;
}

.result-block pre {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 12px;
    padding: 16px;
    max-height: 400px;
    overflow: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

/* Ссылка для справки */
.help-link {
    display: inline-block;
    margin-bottom: 10px;
    cursor: pointer;
    color: #007bff;
    text-decoration: underline;
}

/* Фон модального окна */
.modal {
    display: none; /* по умолчанию скрыто */
    position: fixed;
    z-index: 1000;
    inset: 0;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

/* Содержимое модального окна */
.modal-content {
    background-color: #ffffff;
    margin: 40px auto;
    padding: 20px 30px;
    border-radius: 8px;
    max-width: 800px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    line-height: 1.5;
    color: #000000;
}

/* Кнопка закрытия (крестик) */
.modal-close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close:hover {
    color: #888;
}

.modal-content h1,
.modal-content h2,
.modal-content h3,
.modal-content p,
.modal-content ul,
.modal-content ol,
.modal-content li {
    color: #000000;

.modal-content h2 {
    margin-top: 0;
}

.modal-content hr {
    margin: 16px 0;
}
