.base64-tool-wrapper {
    max-width: 900px;
    margin: 0 auto;
    font-family: system-ui, -apple-system, sans-serif;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 24px;
    box-sizing: border-box;
}

.base64-header {
    text-align: center;
    margin-bottom: 24px;
}

.base64-header h3 {
    margin: 0 0 8px;
    color: #222;
    font-size: 1.5rem;
}

.base64-header p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.base64-container {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.base64-box {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.box-header label {
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

.base64-box textarea {
    width: 100%;
    height: 250px;
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.base64-box textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0,115,170,0.1);
}

.box-output textarea {
    background-color: #f9f9f9;
}

/* Buttons */
.btn-clear, .btn-copy {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.btn-clear:hover { color: #dc3232; background: #ffeaea; }
.btn-copy:hover { color: #0073aa; background: #e6f6ff; }

.base64-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.base64-actions button {
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.2s;
}

.base64-actions button:active { transform: scale(0.97); }

.btn-primary { background: #0073aa; color: #fff; }
.btn-primary:hover { opacity: 0.9; }

.btn-secondary { background: #222; color: #fff; }
.btn-secondary:hover { opacity: 0.9; }

/* Thông báo */
.base64-message {
    text-align: center;
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 500;
    min-height: 20px;
}
.msg-success { color: #46b450; }
.msg-error { color: #dc3232; }

/* Responsive */
@media (max-width: 768px) {
    .base64-container {
        flex-direction: column;
    }
    .base64-box textarea {
        height: 180px;
    }
}