.random-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;
}

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

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

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

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

.random-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);
}

.random-hero__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: #111827;
    color: #ffffff;
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

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

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

.random-tool,
.random-info {
    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);
}

.random-tool {
    padding: 24px;
}

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

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

.random-panel__head {
    min-height: 82px;
    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);
}

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

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

.random-panel__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.random-form {
    display: grid;
    gap: 18px;
    padding: 18px;
}

.random-form__grid {
    display: grid;
    gap: 14px;
    align-items: end;
}

.random-form__grid_2 {
    grid-template-columns: repeat(2, 1fr);
}

.random-panel-section {
    display: grid;
    gap: 14px;
}

.random-panel_hidden {
    display: none;
}

.random-field label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
}

.random-field input,
.random-field select,
.random-field textarea {
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #ffffff;
    color: #111827;
    font-size: 15px;
    outline: none;
}

.random-field input,
.random-field select {
    height: 48px;
    padding: 0 14px;
}

.random-field textarea {
    padding: 14px;
    resize: vertical;
}

.random-field input::placeholder,
.random-field textarea::placeholder {
    color: #94a3b8;
}

.random-field input:focus,
.random-field select:focus,
.random-field textarea:focus {
    border-color: rgba(79, 70, 229, 0.55);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.10);
}

.random-hint {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.random-textarea {
    width: 100%;
    min-height: 220px;
    padding: 18px;
    border: 0;
    resize: vertical;
    background: #f8fafc;
    color: #111827;
    font-size: 15px;
    line-height: 1.65;
    outline: none;
}

.random-textarea_small {
    min-height: 120px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #ffffff;
}

.mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mode-switch__item {
    cursor: pointer;
}

.mode-switch__item input {
    display: none;
}

.mode-switch__item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
    transition: 0.2s ease;
}

.mode-switch__item input:checked + span {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
    box-shadow: 0 14px 26px rgba(17, 24, 39, 0.16);
}

.random-checkbox {
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

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

.random-message {
    padding: 14px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

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

.random-submit {
    display: flex;
    gap: 12px;
}

.random-submit__button,
.random-submit__secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.random-submit__button {
    border: 0;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 18px 34px rgba(17, 24, 39, 0.18);
}

.random-submit__secondary {
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #111827;
}

.random-submit__button:hover {
    color: #ffffff;
    transform: translateY(-1px);
}

.random-submit__secondary:hover {
    color: #111827;
    border-color: rgba(79, 70, 229, 0.45);
}

.random-small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #ffffff;
    color: #111827;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.random-small-btn_dark {
    color: #ffffff;
    background: #111827;
    border-color: #111827;
}

.random-result {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.random-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(148, 163, 184, 0.24);
}

.random-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 12px 22px rgba(17, 24, 39, 0.14);
}

.random-result-text {
    min-height: 140px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: #ffffff;
}

.random-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.random-empty {
    display: flex;
    min-height: 420px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    text-align: center;
}

.random-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    margin-bottom: 18px;
    border-radius: 24px;
    background: #111827;
    color: #ffffff;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.random-empty strong {
    display: block;
    color: #111827;
    font-size: 20px;
    letter-spacing: -0.03em;
}

.random-empty p {
    max-width: 320px;
    margin: 10px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
}

.random-info {
    margin-top: 24px;
    padding: 28px;
}

.random-info__content {
    max-width: 860px;
}

.random-info h2 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 28px;
    letter-spacing: -0.04em;
}

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

.random-info p:last-child {
    margin-bottom: 0;
}

@media (max-width: 980px) {
    .random-hero {
        grid-template-columns: 1fr;
    }

    .random-columns {
        grid-template-columns: 1fr;
    }

    .random-empty {
        min-height: 280px;
    }
}

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

    .random-tool {
        padding: 18px;
    }

    .random-panel__head {
        flex-direction: column;
    }

    .random-panel__actions {
        width: 100%;
        justify-content: stretch;
    }

    .random-small-btn {
        flex: 1;
    }

    .random-form__grid_2 {
        grid-template-columns: 1fr;
    }

    .random-submit,
    .random-actions {
        flex-direction: column;
    }

    .random-submit__button,
    .random-submit__secondary {
        width: 100%;
    }

    .random-info {
        padding: 22px;
        border-radius: 24px;
    }
}