.tool-fullwidth {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Tool shell */
.text-tool {
    max-width: 100%;
    margin: 0 auto;
}

.text-tool.editor-section,
.editor-section.text-tool {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.text-tool .card:not(.result-card) {
    border: 1px solid var(--color-border, #e5e7eb);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
    border-radius: var(--radius, 12px);
    background: var(--color-surface, #fff);
}

.text-tool .card-body {
    padding: 1.25rem 1.35rem;
}

.text-tool .card-title {
    color: var(--color-text, #1f2937);
    font-weight: 700;
    font-size: 1.05rem;
}

.text-tool .form-control,
.text-tool .form-select,
.text-tool .select-input,
.text-tool textarea {
    border-radius: 8px;
    border: 1px solid var(--color-border, #e5e7eb);
}

.text-tool .form-control:focus,
.text-tool .form-select:focus,
.text-tool textarea:focus {
    border-color: var(--color-primary, #0d9488);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.text-tool .btn-primary {
    background: var(--color-primary, #0d9488);
    border-color: var(--color-primary, #0d9488);
}

.text-tool .btn-primary:hover {
    background: var(--color-primary-hover, #0f766e);
    border-color: var(--color-primary-hover, #0f766e);
}

.text-tool .alert {
    border-radius: 10px;
}

[data-theme="dark"] .text-tool .card:not(.result-card) {
    background: var(--color-surface, #1f2937);
    border-color: var(--color-border, #374151);
}

[data-theme="dark"] .text-tool .card-title,
[data-theme="dark"] .text-tool .form-label,
[data-theme="dark"] .text-tool {
    color: var(--color-text, #f9fafb);
}

[data-theme="dark"] .text-tool .text-muted,
[data-theme="dark"] .text-tool .form-text {
    color: var(--color-text-secondary, #9ca3af) !important;
}

[data-theme="dark"] .text-tool .form-control,
[data-theme="dark"] .text-tool .form-select,
[data-theme="dark"] .text-tool textarea {
    background: #111827;
    color: var(--color-text, #f9fafb);
    border-color: var(--color-border, #374151);
}

/* --- tool: unicode-converter --- */
.unicode-tool {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.unicode-tool .form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.unicode-tool .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.unicode-tool .btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    padding: 12px 20px;
}

.unicode-tool .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.unicode-tool .btn-primary {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
}

.unicode-tool .btn-success {
    background: linear-gradient(135deg, #198754, #157347);
}

.unicode-tool .btn-info {
    background: linear-gradient(135deg, #0dcaf0, #0aa2c0);
}

.unicode-tool .btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
}

.unicode-tool .btn-danger {
    background: linear-gradient(135deg, #dc3545, #bb2d3b);
}

.unicode-tool .btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.unicode-tool .btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

.unicode-tool .card:not(.result-card) {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.unicode-tool .card:hover {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.unicode-tool .card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.unicode-tool .result-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    min-height: 120px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.unicode-tool .stats-card {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: none;
    border-radius: 12px;
}

.unicode-tool .stats-item {
    text-align: center;
    padding: 15px 10px;
}

.unicode-tool .stats-number {
    font-size: 24px;
    font-weight: 700;
    color: #1976d2;
    margin-bottom: 5px;
}

.unicode-tool .stats-label {
    font-size: 12px;
    color: #546e7a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unicode-tool .tool-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.unicode-tool .alert {
    border-radius: 8px;
    border: none;
}

.unicode-tool .text-gradient {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.unicode-tool .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.unicode-tool .result-container:hover .copy-btn {
    opacity: 1;
}

.unicode-tool .loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.unicode-tool .tooltip-inner {
    background-color: #333;
    border-radius: 6px;
    font-size: 12px;
}

.unicode-tool .tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #333;
}

.unicode-tool .tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #333;
}

.unicode-tool .tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: #333;
}

.unicode-tool .tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #333;
}

@media (max-width: 768px) {
    .unicode-tool .btn {
        margin-bottom: 10px;
    }
    
    .unicode-tool .stats-item {
        margin-bottom: 15px;
    }
}
