body {
    margin: 0;
    padding: 0;
    background: linear-gradient(180deg, #000000 0%, #1b1b2d 50%, #000000 100%);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    padding: 20px 32px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700; /* делает жирным */
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.header-links {
    margin-left: auto;
    display: flex;
    gap: 16px;
    align-items: center;
}

.header-link {
    color: #f3f6ff;
    text-decoration: none;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.header-link.active-link {
    border-color: rgba(138, 180, 255, 0.8);
}

.header-link:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.center-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin-top: 60px;
    margin-bottom: 80px;
    gap: 18px;
}


.select-row {
    width: 800px;
    display: flex;
    gap: 18px;
}

/* Широкие элементы как у Google */

.select {
    width: 100%;
    padding: 16px 20px;
    font-size: 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    outline: none;
    color: #f5f7ff;
    background: linear-gradient(180deg, #182039 0%, #0a0f26 70%, #050714 100%);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-image:
        linear-gradient(45deg, transparent 50%, #9aa4ff 50%),
        linear-gradient(135deg, #9aa4ff 50%, transparent 50%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.12));
    background-position:
        calc(100% - 28px) center,
        calc(100% - 22px) center,
        calc(100% - 48px) center;
    background-size: 7px 7px, 7px 7px, 1px 60%;
    background-repeat: no-repeat;
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.select:focus {
    border-color: #3fa9ff;
    box-shadow:
        0 0 0 3px rgba(63, 169, 255, 0.35),
        0 18px 36px rgba(0, 0, 0, 0.45);
}

.textarea {
    width: 800px;
    min-height: 20px;     /* ← уменьшаем */
    height: 20px;         /* фиксируем стартовую высоту */
    padding: 10px 20px;
    font-size: 18px;
    border-radius: 12px;
    border: none;
    outline: none;
    background: #f8f8f8;
    color: #000;
    resize: vertical;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.checkbox-row {
    width: 800px;
    display: flex;
    justify-content: center;
    margin-top: -10px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 18px;
    color: #e5e8ff;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 2px solid rgba(63, 169, 255, 0.9);
    background: transparent;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"]::after {
    content: "";
    display: block;
    width: 14px;
    height: 8px;
    border-left: 3px solid transparent;
    border-bottom: 3px solid transparent;
    transform: rotate(-45deg);
    transition: border-color 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked {
    border-color: #8fd5ff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

.checkbox-label input[type="checkbox"]:checked::after {
    border-color: #f4f7ff;
}

.extra-wrapper {
    width: 640px;
    position: relative;
}

.extra-wrapper .textarea {
    width: 100%;
    min-height: 1000px; /* можно менять высоту поля доп. информации */
}

/* Кнопки */

.btn {
    padding: 14px 28px;
    font-size: 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: #fff;
    color: #000;
    font-weight: 600;
    transition: 0.15s;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: #eaeaea;
}

.btn.loading {
    color: #e9f6ff;
    cursor: wait;
    background: linear-gradient(120deg, #0b1224 0%, #0f2c6b 40%, #0b1224 100%);
    box-shadow:
        0 0 12px rgba(64, 179, 255, 0.45),
        0 0 30px rgba(64, 179, 255, 0.35),
        0 0 60px rgba(40, 120, 255, 0.35);
    text-shadow: 0 0 12px rgba(120, 210, 255, 0.6);
    letter-spacing: 0.4px;
}

.btn.loading::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(120deg, rgba(88, 210, 255, 0.0), rgba(88, 210, 255, 0.75), rgba(88, 210, 255, 0.0));
    opacity: 0.8;
    filter: blur(6px);
    animation: neonSweep 1.6s linear infinite;
    pointer-events: none;
    z-index: 0;
}


/* Блок результата (тоже широкий) */

.result-stack {
    width: 100%;
    max-width: 860px;
    margin: 40px auto 30px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.result-stack .result-wrapper {
    width: 100%;
    max-width: none;
    margin: 0;
}

.result-stack .solution-wrapper {
    margin-top: 6px;
}

.result-wrapper {
    width: 100%;
    max-width: 860px;
    margin: 40px auto 0;
}

.result-wrapper + .result-wrapper {
    margin-top: 0;
}

.result-window {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(31, 51, 182, 0.033); /* как в .editor-shell */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03),
                0 20px 45px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    margin-bottom: 0;
}

.cards-panel {
    margin: 10px 0 140px;
}

.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.theory-card {
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(138, 180, 255, 0.2);
    background: rgba(13, 16, 37, 0.92);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.65);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 200px;
    width: 100%;
    overflow: hidden;
}

.theory-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 10%, rgba(108, 128, 255, 0.35), transparent 55%),
                radial-gradient(circle at 85% 20%, rgba(255, 99, 155, 0.2), transparent 45%);
    opacity: 0.75;
    pointer-events: none;
    z-index: 0;
}

.theory-card > * {
    position: relative;
    z-index: 1;
}

.theory-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.theory-question {
    font-size: 19px;
    margin: 0;
    color: #f6f8ff;
    flex: 1;
}

.reveal-btn {
    padding: 8px 22px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(114, 167, 255, 0.15);
    color: #f3f5ff;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.reveal-btn:hover {
    background: rgba(118, 165, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-1px);
}

.reveal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.theory-answer {
    margin: 0;
    color: #dde1ff;
    line-height: 1.55;
    display: none;
    background: rgba(9, 11, 32, 0.8);
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.35);
}

.theory-answer.visible {
    display: block;
}

.status-text {
    width: 100%;
    max-width: 640px;
    text-align: center;
    padding: 14px 18px;
    border-radius: 14px;
    border: 1px solid rgba(138, 180, 255, 0.35);
    background: rgba(12, 18, 40, 0.7);
    color: #cfd7ff;
}

.status-text.error {
    border-color: rgba(255, 123, 123, 0.5);
    color: #ffbdbd;
}

.result-window-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(180deg, #12182e, #0a0f26); /* глубина */
    border-bottom: 1px solid rgba(138, 180, 255, 0.22);   /* голубая линия */
    color: #e4e7ff;
    gap: 16px;
}

.window-dots {
    display: flex;
    gap: 6px;
}

.window-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.window-dots .dot.red { background: #ff5f56; }
.window-dots .dot.yellow { background: #ffbd2e; }
.window-dots .dot.green { background: #27c93f; }

.result-filename {
    color: #f6f6ff;
    font-size: 14px;
    letter-spacing: 0.4px;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #e0e5ff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

.copy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.copy-btn .copy-icon {
    font-size: 16px;
}

.solution-controls {
    display: flex;
    justify-content: flex-end;
    padding: 0 20px 14px;
}

.toggle-btn {
    padding: 6px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #e0e5ff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
}

.result-body {
    background: transparent;
}

pre.result-pre {
    margin: 0;
    background: transparent;
}

code.result {
    display: block;
    width: 100%;
    padding: 24px;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 18px;
    font-family: "Fira Code", "JetBrains Mono", Consolas, monospace;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
    tab-size: 4;
}

code.result.hljs {
    padding: 24px;
    background: transparent;
}

code.result:not(.hljs) {
    color: #d9defa;
}

code.result.loading {
    background: transparent;
    color: #d9defa;
}

/* Скрытие элементов */
.hidden {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes neonSweep {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(120%);
    }
}
