/**
 * DevTools Pro - Shared Tool Page Styles
 * Professional, mobile-first design system for all tool pages
 */

/* ===== TOOL HEADER ===== */
.tool-header {
    margin-bottom: 2rem;
    padding: 2rem var(--page-pad);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

@media (max-width: 640px) {
    .tool-header {
        margin-bottom: 1.25rem;
        padding: 1.25rem 0;
        border: none;
        border-radius: 0;
        background: transparent;
    }
}

.tool-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-heading-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.tool-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.tool-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
    max-width: 500px;
}

.tool-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.tool-badge svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .tool-title-section {
        gap: 1rem;
    }

    .tool-heading {
        font-size: 1.5rem;
    }

    .tool-subtitle {
        font-size: 0.85rem;
    }

    .tool-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 1rem 0;
    }

    .tool-title-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .tool-heading {
        font-size: 1.35rem;
    }

    .tool-subtitle {
        font-size: 0.8rem;
    }

    .tool-badges {
        width: 100%;
        margin-top: 0.25rem;
    }

    .tool-badge {
        align-self: flex-start;
    }
}

/* ===== MAIN LAYOUT ===== */
.tool-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.25rem;
    align-items: start;
    padding: 0 var(--page-pad) var(--page-pad);
}

@media (max-width: 900px) {
    .tool-wrapper {
        grid-template-columns: 1fr;
        padding: 0 var(--page-pad) var(--page-pad);
    }
}

@media (max-width: 480px) {
    .tool-wrapper {
        padding: 0 0.75rem 0.75rem;
        gap: 1rem;
    }
}

/* ===== SETTINGS/CONFIG PANEL ===== */
.settings-panel,
.config-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    position: sticky;
    top: 1rem;
}

@media (max-width: 900px) {

    .settings-panel,
    .config-panel {
        position: relative;
        top: 0;
        padding: 1rem;
    }
}

@media (max-width: 480px) {

    .settings-panel,
    .config-panel {
        padding: 0.875rem;
        border-radius: var(--radius);
    }
}

.settings-header,
.config-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.settings-icon,
.config-title svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.settings-title,
.config-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== FORM ELEMENTS ===== */
.setting-group,
.form-group {
    margin-bottom: 1rem;
}

.setting-group:last-child,
.form-group:last-child {
    margin-bottom: 0;
}

.setting-label,
.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.setting-select,
.setting-input,
.form-control,
.form-input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.setting-select:focus,
.setting-input:focus,
.form-control:focus,
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

@media (max-width: 480px) {

    .setting-select,
    .setting-input,
    .form-control,
    .form-input {
        font-size: 16px;
        padding: 0.75rem 2.25rem 0.75rem 0.75rem;
    }
}

/* ===== TOGGLE SWITCH ===== */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0;
    gap: 0.75rem;
}

.toggle-label {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.toggle-desc {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 0.15rem;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-strong);
    border-radius: 28px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background: var(--surface);
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--accent);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(20px);
}

@media (max-width: 480px) {
    .toggle-switch {
        width: 52px;
        height: 32px;
    }

    .toggle-slider:before {
        height: 26px;
        width: 26px;
    }

    .toggle-switch input:checked+.toggle-slider:before {
        transform: translateX(20px);
    }
}

/* ===== MAIN WORKSPACE ===== */
.main-workspace,
.main-pane {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

/* ===== TABS ===== */
.tabs-container,
.tabs {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.tabs-header,
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabs-header::-webkit-scrollbar,
.tabs::-webkit-scrollbar {
    display: none;
}

.tabs-header,
.tabs {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.tab-button,
.tab-btn {
    flex: 1;
    min-width: fit-content;
    padding: 0.875rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
}

@media (max-width: 480px) {

    .tab-button,
    .tab-btn {
        padding: 0.75rem 0.875rem;
        font-size: 0.8rem;
    }
}

.tab-button:hover,
.tab-btn:hover {
    color: var(--text-primary);
    background: var(--surface-2);
}

.tab-button.active,
.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: var(--surface);
}

.tab-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .tab-icon {
        width: 16px;
        height: 16px;
    }
}

.tab-content {
    display: none;
    padding: 1rem;
    min-height: 300px;
}

@media (max-width: 900px) {
    .tab-content {
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .tab-content {
        padding: 0.75rem;
        min-height: 220px;
    }
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* ===== CODE EDITOR ===== */
.code-editor {
    flex: 1;
    min-height: 250px;
    padding: 0.875rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 900px) {
    .code-editor {
        min-height: 200px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .code-editor {
        min-height: 180px;
        padding: 0.75rem;
        font-size: 0.75rem;
    }
}

.code-editor:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.code-editor::placeholder {
    color: var(--text-tertiary);
}

/* ===== ACTION BUTTONS ===== */
.action-bar,
.actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.625rem;
    flex-wrap: wrap;
}

@media (max-width: 480px) {

    .action-bar,
    .actions {
        flex-direction: column;
    }

    .action-bar .btn,
    .actions .btn {
        width: 100%;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: inherit;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    min-height: 44px;
}

@media (max-width: 480px) {
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        justify-content: center;
    }
}

.btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .btn-icon {
        width: 20px;
        height: 20px;
    }
}

.btn-secondary {
    background: var(--bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-elevated);
    border-color: var(--border-strong);
}

.btn-primary {
    background: var(--accent);
    color: var(--btn-text);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-success {
    background: var(--success);
    color: var(--btn-text);
}

.btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg);
    border-color: var(--border-strong);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    min-height: 38px;
}

/* ===== ALERT BOX ===== */
.alert-box {
    display: none;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-lg);
    margin-top: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
}

@media (max-width: 480px) {
    .alert-box {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--destructive);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.alert-success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

/* ===== MOBILE THEME TOGGLE ===== */
#mobile-theme-toggle {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#mobile-theme-toggle:hover {
    background: var(--surface-elevated);
}

#mobile-theme-toggle .sun-icon,
#mobile-theme-toggle .moon-icon {
    width: 20px;
    height: 20px;
}

/* ===== STATS BAR ===== */
.stats-bar {
    display: none;
    gap: 1rem;
    padding: 0.875rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

.stat-icon {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .stats-bar {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .stat-item {
        font-size: 0.8rem;
        gap: 0.4rem;
    }

    .stat-icon {
        width: 16px;
        height: 16px;
    }
}

/* ===== TABLE/RESULT CONTAINER ===== */
.table-container,
.result-container {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
    max-height: 400px;
}

@media (max-width: 480px) {

    .table-container,
    .result-container {
        max-height: 300px;
    }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-tertiary);
    text-align: center;
    padding: 1rem;
}

.empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.empty-desc {
    font-size: 0.8rem;
    max-width: 280px;
    line-height: 1.5;
}

/* ===== DISPLAY CARD ===== */
.display-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .display-card {
        padding: 1.25rem;
    }
}

.display-value {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

@media (max-width: 480px) {
    .display-value {
        font-size: 1.25rem;
    }
}

.display-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== DROP ZONE ===== */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background: var(--bg);
}

@media (max-width: 480px) {
    .drop-zone {
        padding: 1.5rem;
    }
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.drop-icon {
    width: 48px;
    height: 48px;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .drop-icon {
        width: 40px;
        height: 40px;
    }
}

.drop-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== PRESET LIST ===== */
.presets-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.preset-item:hover {
    background: var(--surface-elevated);
    border-color: var(--accent);
}

.preset-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.preset-cron {
    font-size: 0.75rem;
    font-family: monospace;
    color: var(--text-secondary);
}

/* ===== CHEAT SHEET ===== */
.cheat-sheet {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--text-secondary);
    max-height: 500px;
    overflow-y: auto;
}

.cheat-sheet-item {
    display: flex;
    gap: 0.5rem;
}

.cheat-sheet-item strong {
    color: var(--text-primary);
    font-family: monospace;
    flex-shrink: 0;
}

/* ===== INPUT GROUP ===== */
.input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 480px) {
    .input-group {
        flex-wrap: wrap;
    }
}

.input-group-item {
    border: none;
    background: transparent;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    color: var(--text-primary);
    flex: 1;
    outline: none;
    font-size: 0.95rem;
}

.input-group-prefix,
.input-group-suffix {
    color: var(--text-secondary);
    font-family: monospace;
    flex-shrink: 0;
}

/* ===== SPLIT VIEW ===== */
.split-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .split-view {
        grid-template-columns: 1fr;
    }
}

/* ===== CONTAINER UTILS ===== */
.container-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.container-row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

@media (max-width: 640px) {
    .container-row {
        flex-direction: column;
    }
}

/* ===== FAQ SECTION - PREMIUM ===== */
.faq-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.faq-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.faq-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-item:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.08);
    transform: translateY(-2px);
}

.faq-item summary {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    background: var(--bg);
}

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

.faq-item summary:hover {
    background: var(--surface);
}

.faq-item[open] {
    border-color: var(--accent);
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.1);
}

.faq-item[open] summary {
    background: var(--accent-soft);
    color: var(--accent);
    border-bottom: 1px solid var(--border);
}

.faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-answer {
    padding: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.95rem;
    background: var(--surface);
}

/* ===== ARTICLE CONTENT SECTION - PREMIUM ===== */
.tool-article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.tool-article h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.tool-article h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-article h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: 2px;
}

.tool-article p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.tool-article ul,
.tool-article ol {
    color: var(--text-secondary);
    line-height: 2;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.tool-article li {
    margin-bottom: 0.75rem;
    position: relative;
}

.tool-article li strong {
    color: var(--text-primary);
    font-weight: 600;
}

.tool-article code {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    color: var(--accent);
}

.tool-article pre {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.tool-article pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* ===== RELATED TOOLS SECTION - PREMIUM ===== */
.related-tools-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
}

.related-tools-section h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.related-tools-section h3::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.related-tools-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.related-tool-card {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.related-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-tool-card:hover {
    border-color: var(--accent);
    transform: translateX(6px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.12);
}

.related-tool-card:hover::before {
    opacity: 1;
}

.related-tool-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-soft) 0%, var(--accent-soft) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.related-tool-card:hover .related-tool-icon {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.related-tool-icon svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
    transition: color 0.3s ease;
}

.related-tool-card:hover .related-tool-icon svg {
    color: white;
}

.related-tool-name {
    font-size: 0.9rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.related-tool-arrow {
    margin-left: auto;
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.related-tool-card:hover .related-tool-arrow {
    color: var(--accent);
    transform: translateX(6px);
}

/* ===== CONTENT GRID LAYOUT ===== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 var(--page-pad);
}

@media (min-width: 1024px) {
    .content-grid {
        grid-template-columns: 1.5fr 1fr;
        gap: 2.5rem;
    }

    .content-grid .content-left {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .content-grid .content-right {
        position: sticky;
        top: 6rem;
        height: fit-content;
    }
}

@media (max-width: 1023px) {
    .content-grid {
        gap: 2rem;
    }

    .content-grid .content-right {
        order: -1;
    }
}

@media (max-width: 640px) {
    .content-grid {
        margin: 2rem auto;
        padding: 0 0.75rem;
        gap: 1.5rem;
    }

    .faq-section {
        padding: 1.5rem;
    }

    .faq-section h2 {
        font-size: 1.25rem;
    }

    .faq-item summary {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }

    .faq-answer {
        padding: 1.25rem;
        font-size: 0.9rem;
    }

    .tool-article {
        padding: 2rem 1.5rem;
    }

    .tool-article h2 {
        font-size: 1.5rem;
    }

    .tool-article h3 {
        font-size: 1rem;
    }

    .tool-article p {
        font-size: 0.95rem;
    }

    .related-tools-section {
        padding: 1.5rem;
    }

    .related-tools-section h3 {
        font-size: 1rem;
    }

    .related-tool-card {
        padding: 0.875rem 1rem;
    }

    .related-tool-icon {
        width: 40px;
        height: 40px;
    }

    .related-tool-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ===== BREADCRUMB NAVIGATION ===== */
.breadcrumb {
    max-width: 1200px;
    /* margin: 0 auto; */
    padding: 1rem var(--page-pad);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb-separator {
    color: var(--text-tertiary);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== TOOL H1 HEADING ===== */
.tool-page-header {
    max-width: 1200px;
    /* margin: 0 auto; */
    padding: 1rem var(--page-pad) 1rem;
}

.tool-page-header h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.tool-page-header .subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 0 1.5rem 0;
}

.tool-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.tool-badge svg {
    width: 14px;
    height: 14px;
}

.tool-badge.success {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success);
}

.tool-badge.warning {
    background: rgba(255, 159, 10, 0.15);
    color: var(--warning);
}

.last-updated {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-left: auto;
}

@media (max-width: 640px) {
    .tool-page-header {
        padding: 0rem 1rem 1rem;
    }

    .tool-page-header h1 {
        font-size: 1.75rem;
    }

    .tool-page-header .subtitle {
        font-size: 1rem;
    }

    .tool-meta {
        /* flex-direction: column; */
        align-items: flex-start;
        gap: 0.5rem;
    }

    .last-updated {
        margin-left: 0;
    }
}

/* ===== TABLE OF CONTENTS ===== */
.table-of-contents {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.table-of-contents h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-of-contents a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.table-of-contents a::before {
    content: '→';
    opacity: 0;
    transition: opacity 0.2s;
}

.table-of-contents a:hover::before {
    opacity: 1;
}

@media (max-width: 640px) {
    .table-of-contents {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }
}