.main-container {
    grid-template-columns: 200px 1fr;
    grid-template-areas:
        "left main"
        "left right";
}

.maim-generator-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.neuroset-similar {
    display: none;
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid var(--line-color);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    max-width: 950px;
    margin: 0 auto;
    width: 100%;
}

h1 {
    margin: 0 0 18px 0;
    font-size: 1.375rem;
    color: var(--fiolet);
}

p.lead {
    margin:0 0 18px 0; color: #cfcff9;
}

.prompt-mode-switcher {
    margin: 0 0 18px 0;
    padding: 0;
    border: 0;
}

.prompt-mode-switcher__legend {
    margin-bottom: 10px;
    padding: 0;
    font-size: 0.9375rem;
    color: #dcdcff;
}

.prompt-mode-switcher__options {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.06);
}

.prompt-mode-option {
    position: relative;
    display: inline-flex;
}

.prompt-mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.prompt-mode-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(255,255,255,0.02);
    color: #cbc9f8;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.prompt-mode-option span:hover {
    transform: translateY(-1px);
    border-color: rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.05);
}

.prompt-mode-option input:focus-visible + span {
    outline: 2px solid var(--fiolet);
    outline-offset: 2px;
}

.prompt-mode-option input:checked + span {
    color: #0e0c28;
    background: linear-gradient(135deg, #64ffda, #8b5cf6);
    border-color: rgba(255,255,255,0.16);
    box-shadow: 0 12px 26px rgba(100, 255, 218, 0.18);
}

.prompt-input-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

#promptForm .prompt-counter {
    margin-bottom: 8px;
    font-size: 0.875rem;
    line-height: 1;
    color: #b7b6d8;
    font-family: monospace;
    white-space: nowrap;
}

#promptForm .prompt-counter.is-near-limit {
    color: #ffe08a;
}

#promptForm .prompt-counter.is-over-limit {
    color: #ff8d8d;
}

.prompt-mode-hint {
    margin: 10px 0 0 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #b8b7d9;
}

#promptForm {
    display:grid;
    grid-template-columns: 1fr auto;
    gap:16px;
    align-items:start;
}

#promptForm label {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 8px;
    color: #dcdcff;
}

#promptForm textarea {
    width: 100%;
    min-height: 160px;
    resize: vertical;
    padding: 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    color: #fff;
    border-radius: 10px;
    font-size: 0.9375rem;
    line-height: 1.4;
}

#promptForm textarea:focus {
    outline: none;
    border: 2px solid var(--fiolet);
    background: rgba(255,255,255,0.05);
    transition: all .3s ease-in-out;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 180px;
}

.settings-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.settings-select {
    padding: 10px;
    border-radius:8px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.03);
    color: #fff;
    font-size: 1.0625rem;
}

.settings-select:focus {
    outline: none;
    border: 2px solid var(--fiolet);
    background: rgba(255,255,255,0.05);
    transition: all .3s ease-in-out;
}

.settings-select option {
    background-color: #0e0c28;
}

label[for="prompt-type"] {
    margin-top: 8px;
}

#generateBtn {
    cursor: pointer;
    background: #64ffda;
    color: #0e0c28;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    display: block;
    text-align: center;
    text-decoration: none;
}

#generateBtn:hover {
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.5);
}

#generateBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.limits-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #a0a0c0;
    text-align: center;
}

.limit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.limit-label {
    opacity: 0.8;
    font-weight: 400;
}

.limit-value {
    color: var(--fiolet); /* Используем ваш фиолетовый акцент */
    font-weight: 700;
    font-family: monospace; /* Моноширинный шрифт для цифр выглядит техничнее */
    font-size: 0.9rem;
}

.tip {
    margin-top: 12px;
    color: #bfbff6;
    font-size: 0.8125rem;
}

.prompt-text {
    color: white;
    font-size: 1.0625rem;
    margin-bottom: 10px;
    margin-top: 10px;
    padding: 35px 10px 10px;
    background-color: #1a183a;
    position: relative;
    display: none;
}

.copy-button {
    position: absolute;
    right: 0;
    top: 0;
    background-color: inherit;
    border: 1px solid #1a183a;
    border-radius: 8px;
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    padding: 10px;
}

.copy-button img {
    width: 30px;
    aspect-ratio: 1 / 1;
}

.copy-button img:hover {
    transform: scale(1.05);
}

/* ===== Общие стили секций ===== */
.info-section {
    width: 100%;
    padding: 20px;
}

.section-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid var(--line-color);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    max-width: 950px;
    margin: 0 auto;
    width: 100%;
}

.section-card h2 {
    margin: 0 0 24px 0;
    font-size: 1.375rem;
    color: var(--fiolet);
    text-align: center;
}

.section-lead {
    max-width: 760px;
    margin: -8px auto 0;
    text-align: center;
    font-size: 0.9875rem;
    line-height: 1.7;
    color: #cfcff9;
}

/* ===== Секция инструкции ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.step-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step-item:hover {
    border-color: var(--fiolet);
    background: rgba(255,255,255,0.04);
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--fiolet), #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0e0c28;
}

.step-content h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--site-green);
}

.step-content p {
    margin: 0;
    font-size: 0.9375rem;
    color: #cfcff9;
    line-height: 1.5;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.step-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step-item:hover {
    border-color: var(--fiolet);
    background: rgba(255,255,255,0.04);
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--fiolet), #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0e0c28;
}

.step-content h3 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--site-green);
}

.step-content p {
    margin: 0;
    font-size: 0.9375rem;
    color: #cfcff9;
    line-height: 1.5;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.feature-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 100%;
    padding: 24px 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
        radial-gradient(circle at top left, rgba(100, 255, 218, 0.08), transparent 60%);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 18px;
    text-align: left;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: var(--site-green);
    background: rgba(255,255,255,0.04);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.feature-icon {
    width: 62px;
    height: 62px;
    margin-bottom: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7af7de;
    background:
        linear-gradient(145deg, rgba(100, 255, 218, 0.2), rgba(139, 92, 246, 0.18)),
        rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 12px 24px rgba(100, 255, 218, 0.14);
}

.feature-icon svg {
    width: 30px;
    height: 30px;
}

.feature-item h3 {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    color: #64ffda;
}

.feature-item p {
    margin: 0;
    font-size: 0.9375rem;
    color: #cfcff9;
    line-height: 1.65;
}

/* ===== Секция FAQ ===== */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(188, 140, 255, 0.4);
}

.faq-item[open] {
    border-color: var(--fiolet);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    font-size: 1rem;
    color: #fff;
    font-weight: 500;
    list-style: none;
    transition: all 0.3s ease;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    background: rgba(255,255,255,0.02);
}

.faq-icon {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: var(--fiolet);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.faq-icon::before {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.faq-icon::after {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.faq-item[open] .faq-icon::after {
    transform: translateX(-50%) rotate(90deg);
}

.faq-answer {
    padding: 0 20px 20px;
    color: #cfcff9;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.faq-answer p {
    margin: 0;
}

html[data-theme="light"] .prompt-mode-switcher__options {
    background: linear-gradient(180deg, rgba(114, 88, 239, 0.08), rgba(20, 112, 78, 0.05));
    border-color: rgba(103, 121, 153, 0.22);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
}

html[data-theme="light"] .prompt-mode-switcher__legend,
html[data-theme="light"] .maim-generator-container .card .prompt-mode-option span,
html[data-theme="light"] .maim-generator-container .card .prompt-mode-hint,
html[data-theme="light"] #promptForm .prompt-counter {
    color: var(--text-secondary);
}

html[data-theme="light"] .maim-generator-container .card .prompt-mode-option span {
    background: rgba(255,255,255,0.72);
    border-color: rgba(103, 121, 153, 0.14);
}

html[data-theme="light"] .maim-generator-container .card .prompt-mode-option span:hover {
    background: rgba(255,255,255,0.96);
    border-color: rgba(103, 121, 153, 0.24);
}

html[data-theme="light"] .maim-generator-container .card .prompt-mode-option input:checked + span {
    color: #0f172a;
    background: linear-gradient(135deg, rgba(20, 112, 78, 0.18), rgba(114, 88, 239, 0.16));
    border-color: rgba(20, 112, 78, 0.3);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.1);
}

html[data-theme="light"] #promptForm .prompt-counter.is-near-limit {
    color: #b86b00;
}

html[data-theme="light"] #promptForm .prompt-counter.is-over-limit {
    color: #c62828;
}

@media screen and (max-width: 900px) {
    #promptForm {
        grid-template-columns: 1fr;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "main"
            "left"
            "right";
    }
    h1 {
        font-size: 1.1875rem;
    }
    .info-section {
        padding: 20px 0 20px 0;
    }
    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-card {
        padding: 20px 16px;
    }

    .section-lead {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

    .step-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .feature-item {
        padding: 22px 18px;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .faq-question {
        font-size: 0.9375rem;
        padding: 16px;
    }
    .card {
        padding: 15px;
    }
    .faq-question span:first-child {
        padding-right: 10px;
    }
    .copy-button img {
        width: 25px;
    }
    .prompt-text, .settings-select {
        font-size: 1rem;
    }
    .prompt-input-heading {
        flex-direction: column;
        align-items: flex-start;
    }
    .prompt-mode-switcher__options {
        width: 100%;
    }
    .prompt-mode-option {
        flex: 1 1 100%;
    }
    .prompt-mode-option span {
        width: 100%;
    }
}
