/* Визуал как у ekadashi.universl.top (index.html + login.html), только для slider */

:root {
    --bg: #0c0a12;
    --card: rgba(255, 255, 255, 0.04);
    --border: rgba(196, 181, 253, 0.28);
    --text: #e7e5f0;
    --muted: rgba(231, 229, 240, 0.55);
    --accent1: #c4b5fd;
    --accent2: #f59e0b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.45;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(196, 181, 253, 0.1) 0%, transparent 28%),
        radial-gradient(circle at 88% 72%, rgba(45, 212, 191, 0.06) 0%, transparent 30%);
}

/* ——— страницы входа / регистрации (как login.html экадаши) ——— */
body.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(196, 181, 253, 0.12) 0%, transparent 22%),
        radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.1) 0%, transparent 22%);
}

.auth-page .box {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px;
    border: 1px solid rgba(196, 181, 253, 0.28);
    max-width: 420px;
    width: 100%;
}

.auth-page .box h1 {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #c4b5fd 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-page .sub {
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.auth-page .form-group {
    margin-bottom: 18px;
}

.auth-page .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.auth-page .pw-wrap {
    position: relative;
    isolation: isolate;
}

.auth-page .pw-wrap input {
    padding-right: 52px;
    position: relative;
    z-index: 0;
}

.auth-page .toggle-pw {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background: rgba(30, 30, 40, 0.92);
    border: 1px solid rgba(196, 181, 253, 0.45);
    border-radius: 10px;
    width: 42px;
    height: 36px;
    min-width: 42px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c4b5fd;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.auth-page .toggle-pw:hover {
    background: rgba(255, 255, 255, 0.14);
}

.auth-page .toggle-pw:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

.auth-page .toggle-pw svg {
    display: block;
    flex-shrink: 0;
}

.auth-page input[type="email"],
.auth-page input[type="password"],
.auth-page input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    color: #fff;
    font-size: 1rem;
}

.auth-page input:focus {
    outline: none;
    border-color: #c4b5fd;
    background: rgba(255, 255, 255, 0.14);
}

.auth-page .btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #a78bfa 0%, #f59e0b 100%);
    color: #1a1020;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    font-family: inherit;
}

.auth-page .btn-submit:hover {
    filter: brightness(1.05);
}

.auth-page .btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.auth-page .err {
    display: none;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 16px;
    color: #fca5a5;
    font-size: 0.9rem;
}

.auth-page .err.on {
    display: block;
}

.auth-page .toggle-row {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95rem;
}

.auth-page .toggle-row a {
    color: #f59e0b;
    text-decoration: none;
}

.auth-page .toggle-row a:hover {
    text-decoration: underline;
}

.auth-page .home {
    text-align: center;
    margin-top: 16px;
}

.auth-page .home a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    text-decoration: none;
}

.auth-page .home a:hover {
    color: #c4b5fd;
}

/* ——— кабинет: шапка как index.html экадаши ——— */
body.app-page {
    color-scheme: dark;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(196, 181, 253, 0.1) 0%, transparent 28%),
        radial-gradient(circle at 88% 72%, rgba(45, 212, 191, 0.06) 0%, transparent 30%);
}

.app-page header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(12, 10, 18, 0.92);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.app-page .logo {
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--accent1), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.app-page .nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.app-page .nav-actions span {
    font-size: 0.8rem;
    color: var(--muted);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-page .btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.app-page .btn-primary {
    background: linear-gradient(135deg, #a78bfa, #f59e0b);
    color: #1a1020;
}

.app-page .btn-ghost {
    background: transparent;
    color: var(--accent1);
    border: 1px solid var(--border);
}

.app-page main {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 48px;
}

.app-page main.main-guide {
    max-width: 980px;
}

.app-page .card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 22px 18px;
}

.app-page .card h1 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--accent1);
    font-weight: 600;
}

.app-page .lead {
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 14px;
    line-height: 1.5;
}

.app-page .lead:last-child {
    margin-bottom: 0;
}

.app-page .lead a {
    color: #f59e0b;
    text-decoration: none;
}

.app-page .lead a:hover {
    text-decoration: underline;
}

.app-page .foot {
    text-align: center;
    font-size: 0.78rem;
    color: var(--muted);
    padding: 16px;
}

.app-page .lead code {
    font-size: 0.85em;
    background: rgba(255, 255, 255, 0.06);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(196, 181, 253, 0.2);
}

/* ——— страница оплаты (как donation.html экадаши) ——— */
.donation-top-nav {
    text-align: center;
    margin-bottom: 12px;
    font-size: 0.88rem;
}

.donation-top-nav a {
    color: #f59e0b;
    text-decoration: none;
}

.donation-top-nav a:hover {
    text-decoration: underline;
}

body.donation-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0c0a12;
    color: #fff;
    padding: 24px 16px 48px;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 15% 25%, rgba(196, 181, 253, 0.12) 0%, transparent 25%),
        radial-gradient(circle at 85% 75%, rgba(245, 158, 11, 0.1) 0%, transparent 25%);
}

.donation-wrap {
    max-width: 520px;
    margin: 0 auto;
}

.donation-page h1 {
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #c4b5fd 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.donation-lead {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 24px;
    text-align: center;
}

.donation-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(196, 181, 253, 0.28);
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 20px;
}

.donation-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    flex-wrap: wrap;
}

.donation-tab {
    flex: 1;
    min-width: 30%;
    padding: 12px 8px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
}

.donation-tab.active {
    color: #f59e0b;
    border-bottom-color: #f59e0b;
}

.donation-panel {
    display: none;
}

.donation-panel.active {
    display: block;
}

.donation-panel p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 14px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.donation-pay-btn {
    display: inline-block;
    background: linear-gradient(135deg, #a78bfa 0%, #f59e0b 100%);
    color: #1a1020 !important;
    padding: 14px 22px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

.donation-pay-btn:hover {
    filter: brightness(1.06);
}

.donation-done-btn {
    width: 100%;
    margin-top: 22px;
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: 1px solid rgba(34, 197, 94, 0.35);
    font-family: inherit;
}

.donation-done-btn:hover {
    background: rgba(34, 197, 94, 0.28);
}

.donation-done-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.donation-page .err {
    display: none;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
    color: #fca5a5;
    font-size: 0.9rem;
}

.donation-page .err.on {
    display: block;
}

.donation-hint {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 14px;
    line-height: 1.45;
}

.donation-back {
    text-align: center;
    margin-top: 18px;
}

.donation-back a {
    color: #f59e0b;
    text-decoration: none;
    font-size: 0.9rem;
}

.donation-back a:hover {
    text-decoration: underline;
}

.app-page .settings-h {
    font-size: 1.05rem;
    margin: 0 0 10px;
    color: var(--accent1);
    font-weight: 600;
}

.app-page .muted-small {
    font-size: 0.82rem;
    color: var(--muted);
}

.app-page .form-settings .form-row-app,
.app-page .form-row-app {
    margin-bottom: 16px;
}

.app-page .form-row-app label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    color: rgba(231, 229, 240, 0.88);
}

/* Поля в кабинете — как у форм входа экадаши (тёмные, без «белых пятен» браузера) */
body.app-page textarea,
body.app-page input[type="text"],
body.app-page input[type="email"],
body.app-page input[type="password"],
body.app-page input[type="search"],
body.app-page input[type="url"],
body.app-page select {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(196, 181, 253, 0.35) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.45;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body.app-page textarea::placeholder,
body.app-page input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

body.app-page textarea:focus,
body.app-page input[type="text"]:focus,
body.app-page input[type="email"]:focus,
body.app-page input[type="password"]:focus,
body.app-page input[type="search"]:focus,
body.app-page input[type="url"]:focus,
body.app-page select:focus {
    outline: none !important;
    border-color: #c4b5fd !important;
    background: rgba(255, 255, 255, 0.14) !important;
    background-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 0 0 3px rgba(196, 181, 253, 0.22);
}

body.app-page textarea:-webkit-autofill,
body.app-page input:-webkit-autofill,
body.app-page input:-webkit-autofill:hover,
body.app-page input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    transition: background-color 99999s ease-out;
    -webkit-box-shadow: 0 0 0 1000px #1e1a2e inset !important;
    box-shadow: 0 0 0 1000px #1e1a2e inset !important;
}

body.app-page input[type="file"] {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(196, 181, 253, 0.35) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: rgba(231, 229, 240, 0.92) !important;
    font-size: 0.92rem;
    font-family: inherit;
    cursor: pointer;
}

body.app-page input[type="file"]::file-selector-button {
    margin-right: 14px;
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(135deg, #a78bfa, #f59e0b);
    color: #1a1020;
}

body.app-page input[type="file"]::-webkit-file-upload-button {
    margin-right: 14px;
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    background: linear-gradient(135deg, #a78bfa, #f59e0b);
    color: #1a1020;
}

body.app-page .form-row-app textarea#prompt,
body.app-page textarea#prompt {
    min-height: 180px;
}

body.app-page .form-settings textarea,
body.app-page .card.form-settings textarea {
    min-height: 96px;
}

.app-page .row-actions-app {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.app-page .btn-stop {
    border: 1px solid rgba(248, 113, 113, 0.55) !important;
    color: #fecaca !important;
    background: rgba(239, 68, 68, 0.14) !important;
}

.app-page .btn-stop:hover:not(:disabled) {
    filter: brightness(1.08);
    border-color: rgba(252, 165, 165, 0.75) !important;
}

.app-page .btn-stop:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

body.app-page input[type="checkbox"] {
    width: auto !important;
    max-width: none;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    accent-color: #f59e0b;
    cursor: pointer;
}

.chk-block {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(196, 181, 253, 0.15);
}

.chk-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: rgba(231, 229, 240, 0.88);
    cursor: pointer;
}

.chk-row input {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Страница гайда (markdown) */
.guide-intro h1 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--accent1);
}

.guide-body {
    text-align: left;
    padding: 8px 4px 28px;
    line-height: 1.55;
}

.guide-body h1 {
    font-size: 1.35rem;
    color: var(--accent1);
    margin: 1.3em 0 0.5em;
}

.guide-body h2 {
    font-size: 1.12rem;
    color: #f59e0b;
    margin: 1.4em 0 0.45em;
    padding-bottom: 0.2em;
    border-bottom: 1px solid rgba(196, 181, 253, 0.22);
}

.guide-body h3,
.guide-body h4 {
    color: #c4b5fd;
    margin: 1.1em 0 0.35em;
    font-size: 1.02rem;
}

.guide-body p {
    margin: 0.65em 0;
    color: rgba(231, 229, 240, 0.92);
}

.guide-body ul,
.guide-body ol {
    margin: 0.6em 0 0.6em 1.2em;
    color: rgba(231, 229, 240, 0.9);
}

.guide-body li {
    margin: 0.25em 0;
}

.guide-body a {
    color: #f59e0b;
    text-decoration: none;
}

.guide-body a:hover {
    text-decoration: underline;
}

.guide-body code {
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(196, 181, 253, 0.2);
}

.guide-body pre {
    margin: 1em 0;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(196, 181, 253, 0.28);
    background: rgba(0, 0, 0, 0.5);
    overflow-x: auto;
    font-size: 0.8rem;
    line-height: 1.45;
}

.guide-body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

.guide-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    margin: 1em 0;
}

.guide-body th,
.guide-body td {
    border: 1px solid rgba(196, 181, 253, 0.22);
    padding: 8px 10px;
    vertical-align: top;
}

.guide-body th {
    background: rgba(196, 181, 253, 0.1);
    color: #fff;
}

.guide-body blockquote {
    margin: 1em 0;
    padding: 8px 0 8px 14px;
    border-left: 3px solid #f59e0b;
    color: var(--muted);
}

.guide-body hr {
    border: none;
    border-top: 1px solid rgba(196, 181, 253, 0.2);
    margin: 2em 0;
}

/* Генератор: полоса прогресса + обратный отсчёт (ориентир по времени, без SSE) */
.gen-progress-wrap {
    display: none;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(196, 181, 253, 0.15);
}

.gen-progress-wrap.is-active {
    display: block;
}

.gen-progress-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 8px;
}

.gen-progress-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--accent1);
}

.gen-countdown {
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
    color: #f59e0b;
    font-weight: 600;
}

.gen-progress-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(196, 181, 253, 0.25);
    overflow: hidden;
}

.gen-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #7c3aed, #f59e0b, #34d399);
    background-size: 200% 100%;
    transition: width 0.35s ease-out;
    animation: gen-progress-shimmer 1.8s ease-in-out infinite;
}

@keyframes gen-progress-shimmer {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

.gen-progress-hint {
    margin-top: 8px !important;
    margin-bottom: 0 !important;
}

.gen-options-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 18px;
    margin-top: 12px;
}

.gen-opt-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    color: rgba(231, 229, 240, 0.88);
}

select.gen-select {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(196, 181, 253, 0.35);
    background: rgba(12, 10, 18, 0.92);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
}

select.gen-select:focus {
    outline: none;
    border-color: rgba(245, 158, 11, 0.55);
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.2);
}

.kie-image-panel .kie-engine-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
}

.kie-image-panel .kie-engine-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(231, 229, 240, 0.75);
}

.kie-image-panel .kie-inline {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
