.regex-page {
    padding: 36px 0 80px;
    background:
        radial-gradient(circle at 15% 10%, rgba(79, 70, 229, 0.10), transparent 30%),
        radial-gradient(circle at 85% 8%, rgba(20, 184, 166, 0.10), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 34px;
    color: #94a3b8;
    font-size: 14px;
}

.breadcrumbs a {
    color: #64748b;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #4f46e5;
}

.regex-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 36px;
    align-items: center;
    margin-bottom: 36px;
}

.page-label,
.section-label {
    margin: 0 0 12px;
    color: #4f46e5;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.page-title {
    max-width: 840px;
    margin: 0;
    color: #111827;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1;
    letter-spacing: -0.06em;
}

.page-description {
    max-width: 780px;
    margin: 18px 0 0;
    color: #64748b;
    font-size: 18px;
    line-height: 1.7;
}

.regex-privacy-note {
    display: inline-flex;
    margin-top: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.10);
    color: #047857;
    font-size: 14px;
    font-weight: 800;
}

.regex-hero__card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.regex-hero__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: #111827;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.regex-hero__card strong {
    display: block;
    color: #111827;
    font-size: 18px;
}

.regex-hero__card span {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 14px;
}

.regex-tool,
.regex-info,
.regex-how,
.regex-cheatsheet,
.regex-warning,
.regex-faq {
    border-radius: 30px;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.07);
}

.regex-tool {
    padding: 24px;
}

.regex-grid {
    display: grid;
    grid-template-columns: 430px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.regex-config-card,
.regex-results-card {
    border-radius: 24px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: #f8fafc;
    overflow: hidden;
}

.regex-card__head,
.regex-panel__head {
    min-height: 78px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding: 18px;
    background: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.regex-card__head_small {
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.regex-card__head h2,
.regex-panel__head h2 {
    margin: 0;
    color: #111827;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.regex-card__head p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.regex-pattern-box {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) 24px 70px;
    gap: 8px;
    align-items: center;
    padding: 18px;
    background: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.regex-pattern-box span,
.regex-pattern-box strong {
    color: #64748b;
    font-size: 18px;
    font-weight: 900;
    text-align: center;
}

.regex-pattern-box input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #f8fafc;
    color: #111827;
    font-size: 15px;
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.regex-flags {
    display: grid;
    gap: 10px;
    padding: 18px;
    background: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.regex-checkbox {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.regex-checkbox input {
    width: 16px;
    height: 16px;
}

.regex-textarea {
    width: 100%;
    min-height: 260px;
    padding: 18px;
    border: 0;
    resize: vertical;
    background: #f8fafc;
    color: #111827;
    font-size: 14px;
    line-height: 1.65;
    outline: none;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.regex-textarea_result {
    min-height: 320px;
}

.regex-replace-box {
    padding: 18px;
    background: #ffffff;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.regex-replace-box label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 900;
}

.regex-replace-box input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #f8fafc;
    color: #111827;
    font-size: 14px;
    outline: none;
}

.regex-replace-box p {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.regex-replace-box code,
.regex-info code,
.regex-step code,
.regex-cheatsheet code,
.regex-faq code {
    padding: 2px 6px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #111827;
    font-size: 0.92em;
}

.regex-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    background: #ffffff;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

.regex-main-btn,
.regex-secondary-btn,
.regex-small-btn {
    border-radius: 14px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
}

.regex-main-btn {
    height: 46px;
    padding: 0 18px;
    border: 0;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 16px 30px rgba(17, 24, 39, 0.18);
}

.regex-secondary-btn,
.regex-small-btn {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #111827;
}

.regex-secondary-btn {
    height: 46px;
    padding: 0 18px;
}

.regex-small-btn {
    height: 38px;
    padding: 0 12px;
}

.regex-status {
    margin: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #ffffff;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.regex-status_success {
    color: #065f46;
    background: rgba(16, 185, 129, 0.10);
}

.regex-status_error {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.10);
}

.regex-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 18px;
    background: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.regex-summary__item {
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.22);
}

.regex-summary__item strong {
    display: block;
    color: #111827;
    font-size: 22px;
}

.regex-summary__item span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

.regex-tabs {
    display: flex;
    gap: 8px;
    padding: 14px 18px;
    background: #ffffff;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}

.regex-tab {
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
}

.regex-tab_active {
    background: #111827;
    color: #ffffff;
}

.regex-panel {
    display: none;
}

.regex-panel_active {
    display: block;
}

.regex-highlight {
    min-height: 360px;
    padding: 18px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: #0f172a;
    color: #e5e7eb;
    font-size: 14px;
    line-height: 1.7;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.regex-highlight mark {
    padding: 2px 0;
    border-radius: 5px;
    background: #f59e0b;
    color: #111827;
}

.regex-table-wrap {
    overflow: auto;
}

.regex-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.regex-table th,
.regex-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    color: #334155;
    font-size: 13px;
    text-align: left;
    vertical-align: top;
}

.regex-table th {
    color: #111827;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.regex-table code {
    display: inline-block;
    max-width: 360px;
    padding: 4px 7px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #111827;
    word-break: break-word;
}

.regex-info,
.regex-how,
.regex-cheatsheet,
.regex-warning,
.regex-faq {
    margin-top: 24px;
    padding: 28px;
}

.regex-info__content {
    max-width: 920px;
}

.regex-info h2,
.regex-how h2,
.regex-cheatsheet h2,
.regex-warning h2,
.regex-faq h2 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.regex-info p,
.regex-warning p {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 16px;
    line-height: 1.75;
}

.regex-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.regex-step {
    padding: 20px;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.regex-step span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
}

.regex-step h3 {
    margin: 0 0 10px;
    color: #111827;
    font-size: 18px;
}

.regex-step p {
    margin: 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

.regex-cheatsheet__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.regex-cheatsheet__grid div {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.regex-cheatsheet__grid code {
    min-width: 58px;
    text-align: center;
    font-weight: 900;
}

.regex-cheatsheet__grid span {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.regex-warning {
    background:
        linear-gradient(180deg, rgba(255, 251, 235, 0.92), #ffffff);
}

.regex-faq__list {
    display: grid;
    gap: 12px;
}

.regex-faq__item {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: #f8fafc;
    overflow: hidden;
}

.regex-faq__item summary {
    padding: 16px 18px;
    color: #111827;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.regex-faq__item p {
    margin: 0;
    padding: 0 18px 18px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

@media (max-width: 1100px) {
    .regex-grid,
    .regex-steps,
    .regex-cheatsheet__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .regex-page {
        padding: 26px 0 56px;
    }

    .regex-hero {
        grid-template-columns: 1fr;
    }

    .regex-tool {
        padding: 18px;
    }

    .regex-card__head,
    .regex-panel__head {
        flex-direction: column;
    }

    .regex-summary {
        grid-template-columns: 1fr;
    }

    .regex-tabs {
        overflow-x: auto;
    }

    .regex-actions {
        flex-direction: column;
    }

    .regex-main-btn,
    .regex-secondary-btn,
    .regex-small-btn {
        width: 100%;
    }

    .regex-privacy-note {
        border-radius: 18px;
    }
}