.toolbox-page {
    --tool-primary: #1677ff;
    --tool-primary-dark: #075dcc;
    --tool-ink: #172033;
    --tool-muted: #6e7a90;
    --tool-line: #e6edf7;
    max-width: 1120px;
    margin: 28px auto 0;
    padding: 0 18px 34px;
}

.toolbox-page,
.toolbox-page * { box-sizing: border-box; }

.toolbox-hero,
.tool-panel {
    background: rgba(255, 255, 255, .96);
    border: 1px solid rgba(225, 234, 247, .95);
    border-radius: 22px;
    box-shadow: 0 16px 42px rgba(31, 68, 122, .10);
}

.toolbox-hero {
    position: relative;
    overflow: hidden;
    padding: 32px 34px;
}

.toolbox-hero::after {
    content: '';
    position: absolute;
    width: 240px;
    height: 240px;
    right: -70px;
    top: -100px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(22, 119, 255, .18), rgba(22, 119, 255, 0) 70%);
    pointer-events: none;
}

.toolbox-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--tool-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
}

.toolbox-title {
    margin: 10px 0 8px;
    color: var(--tool-ink);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.toolbox-subtitle {
    max-width: 700px;
    margin: 0;
    color: var(--tool-muted);
    line-height: 1.8;
}

.tool-grid {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 20px;
}

.tool-card {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 190px;
    flex-direction: column;
    padding: 24px;
    overflow: hidden;
    color: inherit !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, .98);
    border: 1px solid var(--tool-line);
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(34, 66, 112, .08);
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    border-color: rgba(22, 119, 255, .32);
    box-shadow: 0 18px 38px rgba(25, 83, 164, .14);
}

.tool-card-icon {
    display: inline-flex;
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 23px;
    border-radius: 15px;
    background: linear-gradient(135deg, #1677ff, #5b8cff);
    box-shadow: 0 8px 18px rgba(22, 119, 255, .24);
}

.tool-card[data-tool="facebook"] .tool-card-icon {
    background: linear-gradient(135deg, #1877f2, #39569c);
}

.tool-card-badge {
    position: absolute;
    top: 22px;
    right: 22px;
    padding: 5px 10px;
    color: var(--tool-primary);
    font-size: 12px;
    font-weight: 700;
    background: #edf5ff;
    border-radius: 20px;
}

.tool-card h2 {
    margin: 17px 0 7px;
    color: var(--tool-ink);
    font-size: 19px;
    font-weight: 750;
}

.tool-card p {
    flex: 1;
    margin: 0;
    color: var(--tool-muted);
    font-size: 14px;
    line-height: 1.65;
}

.tool-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    color: #8a95a8;
    font-size: 12px;
}

.tool-card-arrow { color: var(--tool-primary); font-size: 14px; }

.tool-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
    color: #526078 !important;
    font-size: 14px;
    text-decoration: none !important;
}

.tool-panel { margin-top: 18px; padding: 25px; }
.tool-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.tool-panel-head h2 { margin: 0 0 6px; color: var(--tool-ink); font-size: 20px; font-weight: 750; }
.tool-panel-head p { margin: 0; color: var(--tool-muted); font-size: 13px; line-height: 1.65; }
.privacy-pill { flex: 0 0 auto; padding: 7px 11px; color: #14804a; font-size: 12px; font-weight: 700; background: #eaf9f1; border: 1px solid #ccefdc; border-radius: 20px; }

.tool-tabs { display: flex; gap: 8px; margin-bottom: 18px; padding: 5px; background: #f4f7fb; border-radius: 13px; }
.tool-tab { flex: 1; padding: 9px 12px; color: #66738a; background: transparent; border: 0; border-radius: 10px; font-size: 14px; font-weight: 650; cursor: pointer; }
.tool-tab.is-active { color: #fff; background: linear-gradient(135deg, var(--tool-primary), #5b8cff); box-shadow: 0 5px 14px rgba(22, 119, 255, .22); }
.tool-tab-pane[hidden] { display: none !important; }

.tool-label { display: block; margin-bottom: 7px; color: #3f4c61; font-size: 13px; font-weight: 700; }
.tool-input,
.tool-textarea {
    width: 100%;
    color: #243147;
    background: #fbfdff;
    border: 1px solid #dce5f1;
    border-radius: 13px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.tool-input { height: 44px; padding: 0 13px; }
.tool-textarea { min-height: 150px; padding: 12px 13px; line-height: 1.65; resize: vertical; }
.tool-input:focus, .tool-textarea:focus { border-color: #70aaff; box-shadow: 0 0 0 4px rgba(22, 119, 255, .10); }
.tool-help { margin: 7px 0 0; color: #8a95a8; font-size: 12px; line-height: 1.6; }

.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
.tool-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 0 18px; color: #fff; font-size: 14px; font-weight: 700; background: linear-gradient(135deg, var(--tool-primary), #5b8cff); border: 0; border-radius: 12px; box-shadow: 0 7px 17px rgba(22, 119, 255, .20); cursor: pointer; }
.tool-button:hover { filter: brightness(1.03); transform: translateY(-1px); }
.tool-button:disabled { opacity: .55; cursor: wait; transform: none; }
.tool-button.is-secondary { color: #526078; background: #f1f5fa; box-shadow: none; }
.tool-button.is-danger { color: #bd3f4b; background: #fff0f1; box-shadow: none; }

.tool-alert { display: none; margin-top: 14px; padding: 11px 13px; color: #9b5a00; font-size: 13px; background: #fff8e8; border: 1px solid #f6dfae; border-radius: 11px; line-height: 1.6; }
.tool-alert.is-visible { display: block; }
.tool-alert.is-error { color: #b42330; background: #fff1f2; border-color: #ffd3d7; }

.totp-current { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 13px; align-items: center; margin-top: 18px; padding: 18px; background: linear-gradient(135deg, #f0f7ff, #f8fbff); border: 1px solid #dbeaff; border-radius: 16px; }
.totp-current[hidden] { display: none !important; }
.totp-code { color: #126ce5; font: 800 34px/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .16em; }
.totp-meta { margin-top: 6px; color: #758198; font-size: 12px; }
.totp-countdown { display: grid; width: 56px; height: 56px; place-items: center; color: #126ce5; font-weight: 800; background: #fff; border: 5px solid #bcd8ff; border-radius: 50%; }

.result-list { display: grid; gap: 9px; margin-top: 16px; }
.result-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 11px 13px; background: #f8fafc; border: 1px solid #e8eef6; border-radius: 11px; }
.result-label { min-width: 0; overflow: hidden; color: #4b5870; text-overflow: ellipsis; white-space: nowrap; }
.result-code { color: #126ce5; font: 750 18px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.icon-button { width: 34px; height: 34px; color: #47709e; background: #eaf3ff; border: 0; border-radius: 9px; cursor: pointer; }

.fb-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 19px; }
.fb-column { min-height: 180px; overflow: hidden; border: 1px solid var(--tool-line); border-radius: 15px; }
.fb-column-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 14px; font-weight: 750; }
.fb-column.is-live .fb-column-head { color: #14804a; background: #ebfaf2; }
.fb-column.is-dead .fb-column-head { color: #b23a48; background: #fff0f2; }
.fb-output { min-height: 125px; margin: 0; padding: 13px 14px; color: #3b4659; font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; }
.fb-empty { color: #9ba5b5; }
.fb-summary { display: none; margin-top: 14px; color: #526078; font-size: 13px; }
.fb-summary.is-visible { display: block; }

@media (max-width: 760px) {
    .toolbox-page { margin-top: 18px; padding: 0 12px 24px; }
    .toolbox-hero { padding: 24px 20px; border-radius: 18px; }
    .toolbox-title { font-size: 25px; }
    .tool-grid { grid-template-columns: 1fr; gap: 13px; }
    .tool-card { min-height: 178px; padding: 20px; }
    .tool-panel { padding: 18px 15px; border-radius: 18px; }
    .tool-panel-head { display: block; }
    .privacy-pill { display: inline-flex; margin-top: 10px; }
    .fb-results { grid-template-columns: 1fr; }
    .totp-code { font-size: 27px; }
}

@media (max-width: 420px) {
    .tool-tabs { overflow-x: auto; }
    .tool-tab { flex: 0 0 auto; min-width: 92px; }
    .tool-actions .tool-button { flex: 1 1 auto; padding: 0 12px; }
    .result-row { grid-template-columns: minmax(0, 1fr) auto; }
    .result-code { grid-column: 1 / -1; grid-row: 2; }
}
