/* Keep the container and header exactly as they were */
.converter-tool-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 80px;
    background: var(--nav-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
}

.converter-header {
    text-align: center;
    margin: 25px 25px 25px 25px;
}

.converter-header h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.converter-header p {
    color: var(--footer-text);
    font-size: 0.95rem;
}

.converter-workspace {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.textarea-wrapper {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.textarea-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

#text-input {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1.05rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.stats-bar {
    display: flex;
    justify-content: flex-start;
    gap: 25px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.03);
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--footer-text);
}

html[data-theme="dark"] .stats-bar {
    background: rgba(255, 255, 255, 0.03);
}

.stat-item span {
    font-weight: 700;
    color: var(--primary-color);
}

.controls-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.controls-section label {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
}

.mt-20 {
    margin-top: 20px;
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
}

.case-btn {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    /* Prevents text from breaking into two lines */
}

.case-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 4fr));
    gap: 5px;
}

.utility-btn {
    padding: 6px 9px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    font-size: 0.9rem;
}

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

.primary-btn:hover {
    opacity: 0.9;
}

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

.secondary-btn:hover {
    background: var(--bg-color);
}

.danger-btn {
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
}

.danger-btn:hover {
    background: #dc3545;
    color: white;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .stats-bar {
        justify-content: space-between;
        gap: 10px;
        padding: 10px;
        font-size: 0.8rem;
    }

    .converter-tool-container {
        margin: 10px;
    }
}