/* --- Base Page Layout (Common for all utilities) --- */
.tool-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tool-page h1 {
    color: #007bff;
    text-align: center;
    margin-bottom: 5px;
    font-size: 2rem;
}

.tool-page p {
    text-align: center;
    color: #6c757d;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* --- Main Tool Container --- */
.text-utility-container {
    padding: 30px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background-color: #f8f9fa;
}

/* --- Text Area Styling --- */
.input-section label, .output-section label {
    display: block;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    font-family: monospace; /* Monospace font is professional for code/data */
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* --- Action Buttons (Encode/Decode) --- */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.primary-btn, .secondary-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: background-color 0.2s, transform 0.1s;
}

.primary-btn {
    background-color: #007bff; /* Encode (Blue) */
    color: white;
}

.primary-btn:hover {
    background-color: #0056b3;
}

.secondary-btn {
    background-color: #28a745; /* Decode (Green) */
    color: white;
}

.secondary-btn:hover {
    background-color: #1e7e34;
}

.action-buttons button i {
    margin-right: 8px;
}

/* --- Separator --- */
.separator {
    margin: 30px 0;
    border: 0;
    border-top: 1px solid #ced4da;
}

/* --- Output Utility Buttons --- */
.utility-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.utility-btn {
    background-color: #6c757d;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.utility-btn:hover {
    background-color: #5a6268;
}

.utility-btn:disabled {
    background-color: #adb5bd;
    cursor: not-allowed;
}

.utility-buttons button i {
    margin-right: 5px;
}

/* --- Media Queries --- */
@media (max-width: 600px) {
    .tool-page {
        margin: 20px 10px;
        padding: 20px;
    }
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
}