/* ===== DevTools Hub ===== */
.devtools-categories {
    padding: 50px 0;
}

.category-section {
    margin-bottom: 50px;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-title i {
    color: var(--primary-color);
}

.category-subtitle {
    color: #666;
    font-size: 0.92rem;
    margin-bottom: 24px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid transparent;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(74, 108, 247, 0.12);
    border-color: rgba(74, 108, 247, 0.15);
}

.tool-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}

.tool-card-icon.blue { background: linear-gradient(135deg, #4a6cf7, #6366f1); }
.tool-card-icon.green { background: linear-gradient(135deg, #10b981, #34d399); }
.tool-card-icon.orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.tool-card-icon.red { background: linear-gradient(135deg, #ef4444, #f87171); }
.tool-card-icon.purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.tool-card-icon.teal { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.tool-card-icon.pink { background: linear-gradient(135deg, #ec4899, #f472b6); }
.tool-card-icon.indigo { background: linear-gradient(135deg, #6366f1, #818cf8); }

.tool-card h3 {
    font-size: 1.05rem;
    color: #1a1a2e;
    font-weight: 700;
    margin: 0;
}

.tool-card p {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

.tool-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.tool-tag {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: #f0f3f8;
    color: #4a6cf7;
    font-weight: 600;
}

/* ===== DevTools Search ===== */
.devtools-search {
    max-width: 500px;
    margin: 0 auto 30px;
    position: relative;
}

.devtools-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
}

.devtools-search input {
    width: 100%;
    padding: 14px 18px 14px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.95rem;
    background: #fff;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
}

.devtools-search input:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.devtools-search input::placeholder {
    color: #94a3b8;
}

[data-theme="dark"] .devtools-search input {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .devtools-search input:focus {
    border-color: #4a6cf7;
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

[data-theme="dark"] .devtools-search i {
    color: #64748b;
}

/* ===== Tool Nav Strip (hero içi) ===== */
.tool-nav-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.tool-nav-strip a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    border-radius: 18px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tool-nav-strip a i {
    font-size: 0.7rem;
}

.tool-nav-strip a:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.tool-nav-strip a.current {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

/* ===== Tool Page Common ===== */
.tool-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

.tool-main {
    background: #fff;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    margin-bottom: 30px;
}

.tool-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.tool-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.tool-textarea {
    width: 100%;
    min-height: 200px;
    border: 1px solid #dce1e8;
    border-radius: 10px;
    padding: 14px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    resize: vertical;
    background: #f9fafb;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.tool-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
    background: #fff;
}

.tool-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dce1e8;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    background: #f9fafb;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.tool-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
    background: #fff;
}

.tool-select {
    padding: 10px 14px;
    border: 1px solid #dce1e8;
    border-radius: 10px;
    font-size: 0.85rem;
    background: #f9fafb;
    cursor: pointer;
    font-family: inherit;
}

.tool-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 0;
}

.tool-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, #4a6cf7, #6366f1);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(74, 108, 247, 0.3);
}

.tool-btn:hover {
    background: linear-gradient(135deg, #3b5de7, #4f46e5);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(74, 108, 247, 0.4);
}

.tool-btn:active {
    transform: translateY(0);
}

.tool-btn.secondary {
    background: #f0f3f8;
    color: #4a6cf7;
    box-shadow: none;
}

.tool-btn.secondary:hover {
    background: #e2e8f0;
    box-shadow: none;
    transform: translateY(-1px);
}

.tool-btn.danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.tool-result {
    background: #f9fafb;
    border: 1px solid #dce1e8;
    border-radius: 10px;
    padding: 16px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-all;
    min-height: 60px;
    max-height: 400px;
    overflow: auto;
}

.tool-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 0;
}

.tool-option-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-option-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

.tool-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #555;
    cursor: pointer;
}

.tool-checkbox input {
    accent-color: var(--primary-color);
}

.tool-info {
    background: #f0f3ff;
    border: 1px solid #d4daf7;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 20px;
}

.tool-info h3 {
    font-size: 0.95rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.tool-info p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.tool-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.tool-back:hover {
    text-decoration: underline;
}

/* Diff specific */
.diff-added { background: #dcfce7; color: #166534; }
.diff-removed { background: #fee2e2; color: #991b1b; }
.diff-line { padding: 2px 8px; font-family: monospace; font-size: 0.85rem; }

/* JWT specific */
.jwt-part { margin-bottom: 16px; }
.jwt-part-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}
.jwt-header-label { color: #ef4444; }
.jwt-payload-label { color: #8b5cf6; }
.jwt-signature-label { color: #10b981; }

/* Responsive */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }

    .tool-row {
        flex-direction: column;
    }

    .tool-main {
        padding: 20px 16px;
    }

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

    .tool-btn {
        justify-content: center;
    }
}

/* ===== Dark Mode ===== */
[data-theme="dark"] .category-title { color: #e2e8f0; }
[data-theme="dark"] .category-subtitle { color: #94a3b8; }

[data-theme="dark"] .tool-card {
    background: #1e293b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tool-card:hover {
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .tool-card h3 { color: #e2e8f0; }
[data-theme="dark"] .tool-card p { color: #94a3b8; }

[data-theme="dark"] .tool-tag {
    background: #334155;
    color: #818cf8;
}

[data-theme="dark"] .tool-main {
    background: #1e293b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .tool-textarea,
[data-theme="dark"] .tool-input,
[data-theme="dark"] .tool-select {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .tool-textarea:focus,
[data-theme="dark"] .tool-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: #1e293b;
}

[data-theme="dark"] .tool-label { color: #cbd5e1; }

[data-theme="dark"] .tool-result {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .tool-btn.secondary {
    background: #334155;
    color: #818cf8;
}

[data-theme="dark"] .tool-btn.secondary:hover {
    background: #475569;
}

[data-theme="dark"] .tool-info {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .tool-info h3 { color: #e2e8f0; }
[data-theme="dark"] .tool-info p { color: #94a3b8; }

[data-theme="dark"] .tool-option-group label,
[data-theme="dark"] .tool-checkbox { color: #94a3b8; }

[data-theme="dark"] .diff-added { background: rgba(34, 197, 94, 0.15); color: #34d399; }
[data-theme="dark"] .diff-removed { background: rgba(239, 68, 68, 0.15); color: #f87171; }
