.base-tool-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1rem;
    align-items: start;
    margin-bottom: 1rem;
}

.base-input {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    color: #333;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.base-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    background: #fff;
}

.base-hint {
    margin: 0.45rem 0 0;
    color: #777;
    font-size: 0.82rem;
    line-height: 1.6;
}

.base-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    color: #333;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' fill='none' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2.2rem;
}

.base-select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.base-status {
    margin-top: 0.65rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid #e8eaf0;
    border-radius: 6px;
    background: #f8f9fb;
    color: #666;
    font-size: 0.84rem;
    line-height: 1.5;
}

.base-status.success {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}

.base-status.error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.base-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.3rem;
}

.base-result-card {
    padding: 1rem;
    border: 1px solid #e8eaf0;
    border-radius: 8px;
    background: #f8f9fb;
    min-width: 0;
}

.base-result-name {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.base-result-value {
    min-height: 1.6rem;
    color: #2563eb;
    font-family: 'Fira Code', monospace;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.55;
    word-break: break-all;
}

.base-example-wrap {
    max-width: 920px;
    margin: 0 auto;
    overflow-x: auto;
}

.base-example-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.9rem;
}

.base-example-table th {
    background: #f5f7fa;
    color: #333;
    font-weight: 600;
    text-align: left;
    padding: 0.8rem 0.9rem;
    border-bottom: 2px solid #e0e0e0;
}

.base-example-table td {
    padding: 0.75rem 0.9rem;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.7;
}

.base-example-table tr:last-child td {
    border-bottom: none;
}

.base-example-table td:first-child,
.base-example-table td:last-child {
    font-weight: 600;
    color: #333;
}

@media (max-width: 760px) {
    .base-tool-grid {
        grid-template-columns: 1fr;
    }

    .base-results {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .base-input {
        font-size: 0.9rem;
    }

    .tool-actions {
        flex-wrap: wrap;
    }

    .tool-actions .btn {
        flex: 1 1 120px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .base-result-value {
        font-size: 0.95rem;
    }
}
